MG 2.0 Media Gallery Thumbnails

420

Active member
After a huge import from Photopost to Media Gallery, new thumbnails are not generating at random.

The developer who performed the import, says it could be a server issue or some bug within the gallery.

It appears that you were on the newest page of the gallery, if that is the case these images were created long after the import, and after the thumbnail generation tool had run -- if there are thumbnails that are not being generated it unfortunately wouldn't have anything to do with that rebuild process and since the images without thumbnails appear to be sporadic my best guess would be some sort of server issue or a bug within the gallery that prevented the thumbnail from generating on those images. I've checked and there is nothing in the error log that is relevant to thumbnails

I've already submitted a support ticket to our systems admin to check at the server level.

Thank you.
 
If they are particularly large images then it could be that they’re pre-determined to be too large to resize without causing memory limit issues.

That pre-determined size is set by us in the config and it equates to 20 megapixels.

So if these images are larger than that, we don’t attempt to resize them.

Before doing anything else, can you try and establish what size these images are in pixels?

See: https://xenforo.com/xf2-docs/manual/config/#other-variables

You will want to add this to src/config.php:

PHP:
$config['maxImageResizePixelCount'] = 30000000;
That increases it to a 30 megapixel limit.

After that you’ll want to try uploading those same images again.
 
Thanks Chris. Our developer says

What Chris said in that thread does make sense, if the image is too large they won't generate a thumbnail for it to prevent memory limit errors. You can probably increase that value but I'd recommend talking with your systems admin to determine the best value. I've attached the 5 images I had found that didn't have thumbnails so you can send them to Chris to get more details about exactly why it failed if you'd like to confirm that was the actual cause:

Chris, I will send you the links to these images in a conversation, to keep our domain private.

Also send a link to this thread to our systems admin.

Thank you.
 
The images are 6000 x 4000 pixels, so that's 24 megapixels in total so it exceeds the max pixel count.
PHP:
$config['maxImageResizePixelCount'] = 25000000;
Should be enough to ensure those images can be resized.
 
  • Like
Reactions: 420
Essentially, yes. Most servers would cope fine, but lower end servers may struggle with memory limits if it attempts to resize such a large image, as it's a very memory intensive operation.
 
Back
Top Bottom