Can’t add or display product images on PrestaShop
Two different faults hide behind "image problem" on PrestaShop: an upload that fails when adding a photo, or an image added fine but displayed wrong on the storefront. The causes aren’t the same, and telling them apart stops you looking in the wrong place.
When the upload fails
Two server-side PHP settings, upload_max_filesize and post_max_size, cap the size of files accepted on upload. Today’s multi-megapixel photos easily exceed default values set years ago. PrestaShop doesn’t always show a clear message in this case: the upload just seems to do nothing, or fails without a useful explanation.
Insufficient write permissions on the /img/p folder also block uploads, with the same symptom: nothing happens, or a generic error shows without pointing to the real cause.
When the image is added but displays wrong
When an image is added, PrestaShop automatically generates several resized formats: thumbnail, product page image, zoom, and so on. A theme change sometimes alters the sizes these formats expect, which is why old photos stay blurry or badly cropped after a theme change while new ones display correctly.
The native fix is the Regenerate thumbnails button, under Preferences > Images: it recalculates every format for the whole catalogue based on the sizes currently defined. A browser cache or a CDN can also keep serving an old version of the image after it’s been replaced, which makes it look like nothing changed even though the file on the server is correct.
What I check, in order
-
The actual size of the file sent
Checked against the upload_max_filesize and post_max_size values configured server-side, not just a limit shown inside PrestaShop.
-
Permissions on the /img/p folder
The server needs write access there to save the original image and generate the derived formats.
-
Whether the defined sizes match the active theme
A recent theme sometimes expects different dimensions from the previous one, which is when regenerating thumbnails becomes necessary.
-
Browser cache and any CDN
Before assuming it’s a bug, I check that a cached old version of the image isn’t simply explaining what looks like a display problem.
Related pages
-
Slow-loading PrestaShop store
Poorly optimised images directly weigh on the loading time of product and category pages.
-
Custom PrestaShop module development
When automatic image processing on upload, watermarking or cropping, goes beyond standard settings.
-
PrestaShop 1.6 to 1.7 or 8 migration
Why image formats are worth rechecking after a version or theme change.
Describe your need in one minute
A few targeted questions so I can reply with an estimate rather than another questionnaire.