SEE: http://ellislab.com/expressionengine/user-guide/modules/channel/custom_fields.html#variable-pair-usage

I have my images resized to multiple thumbnail sizes. How do I access the url, height, and width of a specific image thumbnail? I tried something like this:

   {url}, {height}, {width}

It didn't seem to work. Instead, it looks like I was getting the original image (instead of the thumbnail). Suggestions?

Note: I'm using Matrix. Not sure if it matters. But there is an outer tag pair to loop through all the my_image_file.


I thought this worked:

   {url:150x100}, {height:150x100}, {width:150x100}

It only worked for url

  • Is 150x100 actually the name of the image manipulation you setup in your file upload preferences? Feb 1 '13 at 19:34
  • Yes. If I were not trying to access the height and width, I can access the URL like this: my_image_file:150x100. Feb 1 '13 at 19:54
  • Does {my_image_file:150x150:width} work? Feb 1 '13 at 20:04
  • No, it returns a URL, something like this: site.com/uploads/inventory/_150x100:width/82521351.jpg Feb 1 '13 at 21:01
  • I wonder if this is related to the longstanding egregious bug, where you upload an image, go to the edit tab, change the dimensions of the image, save it, and click use this image and it generates a tag with the original dimensions? what does {height:150x100} return? The original image height?
    – UltraBob
    Feb 6 '13 at 4:49

This works for me, tested in EE2.5.5 and Matrix 2.4.1

{url:150x100}, {height}, {width}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.