Thumbnail Generation PHP Memory Limit NextGEN Gallery
If you are having trouble generating thumbnails with NextGEN Gallery, this could be down to your web hosts default memory usage allocation for PHP applications.
Increasing the memory usage for PHP Applications
You can increase the memory usage allocation for an individual PHP applications, such as NextGEN gallery, which require more memory usage than other applications. You can do this by using @ini_set:
@ini_set('memory_limit', 'x'); where x is the memory.
In the case of NextGEN Gallery:
- Open /wp-content/plugins/nextgen-gallery/lib/gd.thumbnail.inc.php with a text or code editor.
- Search for the text @ini_set(‘memory_limit’, ‘128M’); which should be commented out.
- Remove the // from in front of the @ini_set(‘memory_limit’, ‘128M’);
- Save the changes and upload the changed file to your server (replace the gd.thumbnail.inc.php file in /wp-content/plugins/nextgen-gallery/lib/ with this new saved file)
- Go back to your WordPress admin site and in NextGEN select all the images that do not have thumbnails and recreate them.
You should now see that the thumbnails have been generated. 128M is usually enough in most cases from our experience, but if you find that thumbnails are still not being created then try increasing the memory limit to @ini_set(‘memory_limit’, ‘256M’);
Remember – if you update NextGEN Galley automatically from within WordPress you will have to repeat this process.