ImageCache images are not resized. Original size image from local server and remote images are resized properly, but ImageCache preset images are not.

Comments

henrijs.seso’s picture

Well... I can see how this could be by design. ImageCache profiles are there for a reason (pixel perfect size for design, rounded corners, etc.) and maybe administrator wants user or content manager not to resize images that are inserted from ImageCache profiles...

BUT...

then no resizing should happen, content should be saved as before with some warning message, like, you have no permission to change image size. Also then link to original should be replaced with link to other ImageCache profile, not original picture.

quicksketch’s picture

Status: Active » Postponed (maintainer needs more info)

Image Resize Filter should resize ImageCache images just like any other image. This is sometimes useful if you have an ImageCache preset such as "Desaturate" which doesn't do anything but change the image to grayscale. Then you can use Image Resize Filter to scale it to whatever size you want.

You'll need to provide more information on how to reproduce this issue, since resizing ImageCache presets works fine for me. Make sure that the output HTML includes a height and width tag for the ImageCache image, since Image Resize Filter requires a height/width in the HTML to operate properly.

quicksketch’s picture

Status: Postponed (maintainer needs more info) » Active

I was able to reproduce this by trashing my "imagecache" directory in the files directory and then trying to include an ImageCache image in the body of a textarea. Image Resize Filter contains code that checks for Image Cache images and generates the image if it does not exist yet, but it looks like changes to Image Cache have broken this functionality. I'm working on a patch now.

quicksketch’s picture

Status: Active » Needs review
StatusFileSize
new1.17 KB

This patch should correct the problem. ImageCache previously resized images at the following URL: "[files]/imagecache/[files]/something.png". But at some point it switched to "[files]/imagecache/something.png", and the file directory is simply implied to keep the URL shorter. This patch makes it so that the file directory path is re-added if an image isn't found at the given path.

quicksketch’s picture

Status: Needs review » Fixed

I've committed in preparation for a 1.6 version.

quicksketch’s picture

Title: ImageCache preset images are not resized » ImageCache preset images are not resized if the image does not already exist

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.