Magento - can't upload product images in admin

Magento - can't upload product images in admin

September 2, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento - can't upload product images in admin

Troubleshooting Magento Product Image Upload Issues

As a senior developer specializing in e-commerce platforms like Magento, I often encounter challenges faced by merchants during upgrades or migrations. One common issue is the inability to upload product images after upgrading your Magento installation.

In your case, you’ve recently upgraded from version 1.5 to 1.7 and are experiencing difficulties uploading product images in the admin panel. Let’s dive into a step-by-step troubleshooting approach to resolve this issue.

Understanding the Image Upload Process

Before we proceed with solving the problem, it’s essential to understand how Magento handles image uploads:

  • When you select an image using the ‘Browse’ button, it is temporarily stored in the /media/tmp folder.
  • After clicking ‘Upload’, Magento attempts to move this temporary file to the appropriate product image directory under /media/catalog.
  • During this process, Magento also resizes and compresses the image according to your configuration settings.

Analyzing the Error Symptoms

The two JavaScript errors you encountered—one related to prototype.js and another to product.js—indicate that there might be compatibility issues with your JavaScript libraries or potential conflicts introduced during the upgrade. Additionally, finding images only in the /media/tmp folder suggests a problem with file movement or write permissions.

Step-by-Step Troubleshooting Approach

1. Verify File Permissions and Ownership

Ensure that the web server (Apache) has write access to both the /media directory and its subdirectories recursively. You can set the ownership to the user running your Apache service or grant appropriate permissions using the following command:

chown -R www-data:www-data /path/to/magento/root
chmod -R 775 /path/to/magento/root/media/

2. Check Configuration Settings

Review your Magento configuration for any settings that might affect image uploads, particularly under media and system.xml. Ensure that the upload_dir parameter is set correctly to point to the appropriate directory within /media/catalog.

3. Inspect JavaScript Libraries

Given the JavaScript errors you’ve encountered, it’s crucial to validate your library versions:

  • Update Prototype.js to a stable version (e.g., 1.7 or later) that is compatible with your Magento version.
  • Ensure that your jQuery and jQuery UI libraries are up-to-date and properly incorporated into your theme.

4. Re-check PHP Configuration

Although you mentioned adding a php.ini file, it’s worth double-checking other PHP configuration settings:

  • Verify the file_uploads directive is enabled (1) in your php.ini.
  • Ensure that the max_file_uploads, post_max_size, and memory_limit values are sufficient for handling large images.

5. Test on Different Environments

Since you’re working under a sub-domain during development, ensure that the Magento installation has proper access to relative paths:

  • Verify that your base URL is correctly configured in the Magento admin panel.
  • Check if there are any conflicts with .htaccess files or Apache configurations related to the sub-domain.

Conclusion and Further Resources

In summary, when troubleshooting Magento product image upload issues after an upgrade, focus on verifying file permissions, inspecting JavaScript libraries, re-checking PHP configuration settings, and ensuring proper access under a sub-domain environment.

Remember that Magento’s image handling process involves multiple steps ranging from temporary storage to final movement and resizing. Each of these stages can potentially cause failures due to various factors such as incompatible library versions or incorrect file permissions.

For more in-depth troubleshooting guidance and best practices for Magento development, I recommend visiting the official documentation at https://laravelcompany.com/magento-documentation.

If you’re still facing challenges after implementing these steps, consider reaching out to a professional Magento developer or support service for additional assistance.

Magento 1 Catalog Security Admin

Our network