Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to customize the markup for an image? (Wordpress)

edited April 2012 in MarsEdit
I will like to customize the markup that goes in the image as a h-ref. I'm using wordpress and I know you can customize this by going into the Upload Utility window for the "Style" popup, then you can "Edit" them. My problem lies that I'm not sure exactly how/what to write.

this is an example of what it should look like once its published:

a href="" rel="attachment wp-att-6951"><-img src="#fileurl#" alt="#alttext#" title="#displayname#" width="#imgwidth#" height="#imgheight#" class="aligncenter size-medium wp-image-6951" /-></a

and this is a the default from MarsEdit.

img src="#fileurl#" alt="#alttext#" title="#displayname#" border="0" width="#imgwidth#" height="#imgheight#" style="float:right;" /

what should I write inside:
1.- href=" "
2.- rel=" "
3.- class= " "




  • Hi Miguel - the HTML markup got stripped in your post, but I think I have the gist of what you are asking. Unfortunately, I don't think it will be possible for you to exactly mimic the format you have listed, because there are some values like the "rel" attribute that are made up by WordPress only after the image has been uploaded.

    The href is easy - you probably want that to be the same as the image "src"… I.e. the URL of the image itself. So for that part it would just be <a href="#fileurl#".

    Class may be something you can hardcode, but I suspect it probably has a numeric component like the rel tag that is, unfortunately, not something MarsEdit has access to.

  • When you upload a picture in wordpress it makes two versions (href and scr). The scr is a scaled version of the href. If you click through the href you go to a high-res image (this is what I really need) but when you look at it in the post is a scaled version.


    rel="attachment wp-att-6808"


    class="aligncenter size-medium wp-image-6808"

  • Yeah, unfortunately MarsEdit doesn't currently have access to the different versions of a photo that are created by WordPress after you update. It would be a nice enhancement for WordPress if they would make this information available after the upload. Currently I am planning to support something like this independent of WordPress, but it doesn't seem likely that MarsEdit will get access to the information WordPress's own solution.
Sign In or Register to comment.