Hello OpenCart Community,
I’m having trouble with product images not displaying on my OpenCart storefront, even though I’ve uploaded them through the admin panel. The image paths look correct, but I just see broken image icons or placeholders. I’m new to OpenCart, so I might be missing something simple, and I’d really appreciate any help troubleshooting this!
Setup Details:
OpenCart Version: 3.0.3.8 (confirmed via admin dashboard), running on Apache with PHP 7.4.
Environment: Shared hosting (Linux, cPanel), domain mystore.com, no CDN.
Image Upload: Added images (JPEG, <500KB) via Catalog > Products > Edit Product > Image tab in the admin panel.
File Paths: Images are stored in public_html/image/catalog/products/, e.g., image/catalog/products/sample.jpg. Admin panel shows thumbnails correctly.
Storefront Issue: Product pages show broken image icons.
Configuration:
Image settings: Default theme, no custom modules affecting images.
File permissions: image/ folder and subfolders set to 755, files to 644 (verified via cPanel File Manager).
Steps Tried:
Cleared cache via Admin > Dashboard > Clear Cache (both theme and image cache).
Checked .htaccess—standard OpenCart rules, no redirects blocking images.
Re-uploaded images in admin panel—still no display on storefront.
Inspected browser console—404 errors for image URLs, but files exist in public_html/image/catalog/products/.
Ran chmod -R 755 image/ on server to confirm permissions—no change.
Reviewed OpenCart’s image upload guide (https://docs.opencart.com/en-gb/catalog/product/)—followed all steps.
Expected: Product images display on the storefront (e.g., product listing and detail pages).
Actual: Broken image icons with 404 errors in browser console, despite images showing in admin.
Questions:
Why are my product images getting 404 errors on the storefront, even though the paths are correct?
Are there specific OpenCart settings or file permissions I should double-check?
Could this be a cache or .htaccess issue, even after clearing cache?
Any debugging tips to trace why images aren’t loading?
I’ve followed the forum rules and need this fixed for my client’s store launch. Any advice or pointers would be awesome!
Hello,
and welcome to this forum.
One step I'm missing is, have you also checked the log files?
Mean the one of opencart (error.log) as well as the server log for any entries?
Images in the store front (catalog) are always be cached before they are displayed.
The path to these images should be therefore als poitning to the cache folder, never to the original image folder itself.
What I've seen at some clients is, that images are sometimes broken (can be caused during the upload, or wrong converted ..).
If the image function is trying to cache such files, errors are stored (something like .. header corrupt .., wrong IPTC data, etc. ..).
and welcome to this forum.
One step I'm missing is, have you also checked the log files?
Mean the one of opencart (error.log) as well as the server log for any entries?
Images in the store front (catalog) are always be cached before they are displayed.
The path to these images should be therefore als poitning to the cache folder, never to the original image folder itself.
What I've seen at some clients is, that images are sometimes broken (can be caused during the upload, or wrong converted ..).
If the image function is trying to cache such files, errors are stored (something like .. header corrupt .., wrong IPTC data, etc. ..).
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Confirm the Exact URL in the Browser Console
Right-click the broken image → Inspect → get the full src URL.
Example:
Paste this directly into a browser tab.
If it works, then OpenCart is generating bad URLs somewhere. If it fails with 404, it's a server path, file, or access issue.
Verify Image File Existence & Case Sensitivity
Remember Sample.jpg ≠ sample.jpg
Linux servers are case-sensitive. so use like this to verify
Right-click the broken image → Inspect → get the full src URL.
Example:
Code: Select all
https://mystore.com/image/catalog/products/sample.jpg
If it works, then OpenCart is generating bad URLs somewhere. If it fails with 404, it's a server path, file, or access issue.
Verify Image File Existence & Case Sensitivity
Remember Sample.jpg ≠ sample.jpg
Linux servers are case-sensitive. so use like this to verify
Code: Select all
ls -l public_html/image/catalog/products/
Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature
Who is online
Users browsing this forum: No registered users and 5 guests