erskinedesign / ed.imageresizer.ee2_addon

EE2+ Version of the ED ImageResizer. Resizes, crops and caches images on the fly.
43 stars 12 forks source link

Setting height in image tag cause issues in fluid layouts #18

Closed timprint closed 12 years ago

timprint commented 12 years ago

Having the height returned as a value in the img tag when you only set the width causes a bit of a problem with fluid images. The height stays fixed on resize and doesn't stay in proportion.

Any chance of only having the values being set returned in a future version?

Cheers

linssen commented 12 years ago

Hi Tim You can just use the href_only="yes" param, then you can set the rest of the image's parameters as you need in the markup:

<img alt="My image" src="{exp:ed_imageresizer
    image="{cf_my_image}"
    maxWidth="1000"
    maxHeight="1000"
    href_only="yes"
    }" />

Does that help?

timprint commented 12 years ago

Cheers Will, thanks for your time.

That was the first thing I tried. Works great.

But. It seems to stop the Assets meta data for the file being returned with an Assets fieldtype in a Matrix cell.

Will do some more experimenting.

linssen commented 12 years ago

Perhaps a combination of the two. Let me know how you get on, and good luck!