After re-cropping an image, the cached image-style isn't updated, so the image with "old" cropping is still displayed.

Comments

yhager’s picture

are you using imagecache to display the image?

sch4lly’s picture

I'm on D7, so i use the built in image styles (but i assume they work just like imagecache did)

Zdorovega’s picture

Confirm bug, it`s really appear when recrop image and resave form...

sch4lly’s picture

StatusFileSize
new661 bytes

Attached is a patch which updates the image derivates after saving an cropped image

jox’s picture

Your patch should work in most cases but is not perfect since the file path is hard coded (/sites/default/files/).

I fixed it by adding just this line:

// Remove cached versions of the cropped image. 
image_path_flush($src->uri);
yhager’s picture

Can you please reroll the patch with the latest fix?

jox’s picture

Status: Active » Needs review
StatusFileSize
new467 bytes

Reroll.

yhager’s picture

Status: Needs review » Closed (fixed)

Committed, thanks.