ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How to output height and width of image manipulated by EE's file upload

November 23, 2012 5:00am

Subscribe [3]
  • #1 / Nov 23, 2012 5:00am

    zizther

    228 posts

    I have a file upload which is manipulating the image upload to a couple of different sizes.
    The 2 different short names are small and large

    In short i want to display the small image and i need to display the width and height of the image.

    This is what i am using:

    {photo}
        {site_url}assets/images/grey.png
    {/photo}

    I have tried using {width:small} and {height:small} this does not work and EE ignores it.
    If i use {width} and {height} it pulls in the original image width and height.

    Is there a way to get the width and height of a manipulated image?

    I am using EE 2.5.3

    Thanks

  • #2 / Nov 23, 2012 9:59am

    e-man

    1816 posts

    What happens when you use:

    {photo}
        {site_url}assets/images/grey.png
    {/photo}
  • #3 / Nov 23, 2012 10:21am

    zizther

    228 posts

    EE does not seem to do anything with it. EE ignores it.

  • #4 / Nov 23, 2012 10:29am

    e-man

    1816 posts

    You mean it’s not parsing it?

  • #5 / Nov 23, 2012 10:29am

    zizther

    228 posts

    That is right, it renders as width=”{small_width}”

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases