When I upload a new image, and I chose the Cropping dialog, the images for my image styles don't appear (i get little black squares).
However, when I close the dialog and open again, they are loaded.

Not critical, but a bit annoying

 images not loaded first time

Comments

nielsvoo’s picture

I have the same problem!
After refreshing it works fine but the next picture not.

Please help!

patoshi’s picture

same issue

nielsvoo’s picture

Today i noticed the problem appear on png images not with jpg images.

niels

patoshi’s picture

seems that you need to do a shift reload after selecting your crop and saving. I had to do a right click open image in new tab in my chrome and did a refresh to have it updated. so it seems to be a browser cache issue.

maybe the solution to this would have epsa_crop regenerate a new image on each crop so the filename changes and it would register the image as a new file to the browser without having it to pull a cached version of it.

blackandcode’s picture

I have the same porblem. As I see it appears only when we tried to open modal for the first time after uploading an image. Is there any way to fix this?

cwithout’s picture

StatusFileSize
new1.35 KB

Here's a patch to fix this. Initializes Jcrop on the image load event rather than waiting 1 second.

Also adds text that says 'loading...' while it waits, because images can sometimes take a pretty long time if file size is large and/or slow server. Hides the loading text after image has loaded.

(Added benefit is that there won't be a lag on existing images, which even at just 1 second are sometimes pretty noticeable.)

pieterdc’s picture

Status: Active » Needs review

Patch from comment #6 works for me.
Thanks @cristinawithout for sharing!

yvmarques’s picture

Status: Needs review » Closed (fixed)

I've committed the path. Thanks for the work.