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.

Linking to a manipulated image.

June 23, 2011 10:08am

Subscribe [2]
  • #1 / Jun 23, 2011 10:08am

    Benjamin

    116 posts

    Is there a way to link to an manipulated image in 2.2.

    Say you’ve got a {blog_image} custom field in a channel. To display the image in you template one can use

    {blog_image}

    When you create an automatic image manipulation with File Upload Preferences to create a cropped image with the short name “blog_img_crop”, how can you link directly to that image inside your entry template?

  • #2 / Jun 23, 2011 6:28pm

    Robin Sowell

    13255 posts

    Not yet.  You can do it with the file module but the file field still works like before.  And yes- it’s definitely on the agenda to make all of a file’s information available to the file field, it just isn’t yet.

    Depending on the site, you could get creative and hard code the path- then just use the {filename} variable- because that stays the same.  But it wouldn’t be dynamic (unless you got clever w/php)- so unless you knew all of the images were in the same directory, it wouldn’t work.  If they WERE in the same directory, that sort of workaround would work.

    Make sense?

  • #3 / Jun 23, 2011 6:45pm

    Benjamin

    116 posts

    I knew it sounded to good to be true. To be honest, i thought this was the point of having automatic image manipulation.

    Off course image manipulation as it stands in EE 2.2 is still extremely useful when for example you’re using the File Manager as Gallery type thing with new File Module. I just guessed one could use the manipulated image data from inside channel entries tags also.

    Is it still useful to make a feature request for this, or is this an already planned feature (I sure hope so! Then we could all say goodbye plugins like ImgSizer).

    Besides this (and this), the new file manager rocks!

    Thanks

  • #4 / Jun 23, 2011 7:13pm

    Robin Sowell

    13255 posts

    LOL- yea, our interesting implementation of auto-crop.  At this point I wonder if I just flat misunderstood what they wanted with that.  But they saw it demo’d and seemed happy.  The Adaptive Crop makes much more sense to me though.

    And no need for an FR for either, they’re both on the agenda.  I won’t swear the file field parsing will make 2.3- we have to get the gallery import stuff done first and and the file field is actually a bit tricky because of the flexibility we want in there.  And of course- optimizing things db wise.

    But yep- they’re both high on the list of wants- and I wants for 2.3.  I just can’t promise!

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

ExpressionEngine News!

#eecms, #events, #releases