Magento not rebuilding product image cache, certain pages loading with url extension ?_SID=U

Magento not rebuilding product image cache, certain pages loading with url extension ?_SID=U

September 23, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento not rebuilding product image cache, certain pages loading with url extension ?_SID=U

Solving Magento Image Cache Rebuild Issues

The Problem Explained

You’re facing a critical Magento issue where the image cache is not rebuilding properly after being cleared. This leads to certain pages loading incorrectly with a ?___SID=U URL extension, and product images appearing blank despite the media directory having permissions set to 777. Additionally, other elements like the footer and sidebar fail to load on these affected pages.

Step-by-Step Troubleshooting Approach

1. Check Your PHP Configuration

The first step is to ensure your PHP configuration supports sufficient memory allocation for Magento to process image rebuilding tasks efficiently.

  • Verify that memory_limit in your php.ini file is set to at least 512M (for larger sites, consider setting it higher).
  • If you’re running PHP as a FastCGI module or via a webserver like Nginx, check the corresponding configuration files for memory limits as well.

Remember, Magento may require significantly more memory during cache rebuilding operations compared to regular page loading.

2. Validate Your .htaccess Settings

Ensure your .htaccess file isn’t limiting memory usage unnecessarily.

  • Look for any lines related to memory_limit in your .htaccess file and verify if they match or exceed the PHP settings you’ve configured.
  • If there are conflicting directives, it’s best to remove them or adjust them to align with your intended PHP configuration.

3. Rebuild Magento Cache Manually

Even though you mentioned previously attempting this without success, let’s go through the process again:

  1. Navigate to System > Cache Management in your Magento admin panel.
  2. Click on ‘Flush Magentocache’ and then ‘Flush Catalog/Cache images’.
  3. Review the output to ensure both operations were successful.

If these steps still fail, proceed with the manual cache folder deletion approach:

  • Log into your server via SSH or FTP/SFTP.
  • Locate the var/cache directory (usually found in the root folder of your Magento installation).
  • Delete all folders and files within this directory using rm -rf *.

4. Review File Permissions

While you mentioned setting permissions to 777, it’s worth double-checking:

  • Ensure that both the media and pub/media/catalog/product directories have proper read, write, and execute permissions for all users.
  • You can set them using chmod -R 775 /path/to/your/directory.

5. Check Cron Jobs

Magento relies on cron jobs to perform various background tasks like cache rebuilding. Ensure your Magento cron jobs are configured correctly:

  • Log into your server via SSH or the control panel provided by your hosting provider.
  • Run crontab -l to view the current cron job settings for the user running Magento.
  • Verify if there are any entries related to Magento and update them if necessary.

Potential Solutions from External Sources

The linked article (http://codepoets.co.uk/2011/magento-not-finding-product-images-solution/) suggests renaming folders manually. While this approach might not directly resolve your issue, it’s worth considering as a last resort if all other steps fail:

  • Rename the media folder to something like media_bak.
  • Create a new empty folder called media.
  • Grant appropriate permissions to the new folder.
  • Clear the cache again and check for improvements.

Final Thoughts

Remember, Magento is a complex e-commerce platform that demands careful consideration of system resources. Rebuilding image caches in particular can be resource-intensive, especially on larger sites with extensive product catalogs.

Always ensure your server meets the recommended requirements, and if you’re unsure about any configuration changes, consult with your hosting provider or a professional Magento developer.

Feel free to explore our comprehensive guides on Magento performance optimization at Laravel Company for more in-depth insights into managing this powerful platform effectively.

Catalog Cache Security Extensions

Our network