Jump to content

Image variations not always being generated


cosmicsafari
 Share

Recommended Posts

Hi all,

I am working on a site which involves a lot of image upload fields, 99% of the time it works perfectly but I have noticed that every so often image variations will be missing.

Like the original uploaded image is fine but maybe 1 or 2 out of the variations is just blank.

The variation files will appear within the assets folder but they will be just in name only without any actual image content.

Since its quite a random thing I am finding it rather difficult to figure out why this happens?

Any ideas?

Link to comment
Share on other sites

You're generating the variations with the API on the frontend, right?

This sounds like a memory limit thing. I've had sites crash when they got a bunch of really big images added to a page. Access that page after and the processing time is clearly noticeable. On extreme cases I got a timeout, but refreshed the page and since most variations were already generated from the previous attempt, the second try goes through.

This may help:
https://processwire.com/blog/posts/processwire-3.0.63-adds-client-side-image-resizing/ 

  • Like 2
Link to comment
Share on other sites

In my last project I had a to import about 4000 images, and had problem with about 1200 images. Images uploaded (using API from frontend), but some of them doesn't had variations images. Problem was that PHP GD image resize engine is very strict, and if there is any problem with image (beginning and ending bytes of file) GD resize failed. More about my case and solution is here.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...