Jump to content

Image URLs hardcoded in admin

Magic Toolbox

Recommended Posts

PrestaShop uses this  method to insert product images:


This works throughout PrestaShop - both in the front-end and the backend (admin) of all PrestaShop websites. Addons also use this method for displaying product images.

However, the images in the Images section of the product page in admin are hard coded. They do not use the Link::getImageLink method, which is an error.

The Sirv image CDN addon overrides the standard method, substituting PrestaShop image URLs with Sirv URLs (for better optimisation and faster loading). But images in the Images section are not loaded, because of the hardcoded images. See screenshot attached.

Can the PrestaShop development team please change the code to use the Link::getImageLink method? The hardcoded references are located in this file:




p.s. the reason to use the Sirv addon is that it optimises images much smaller, automatically serves the most optimal format e.g. WebP, and serves images faster from a global CDN. However, the addon depends on the correct declaration of product image locations, which is Link::getImageLink.


Link to comment
Share on other sites

  • 1 month later...

This topic was submitted to Github here: https://github.com/PrestaShop/PrestaShop/issues/12763

The outcome was that the issue was resolved in PrestaShop 1.7, so all versions since then do not have this issue.

Official PrestaShop support for version 1.6 ended in October 2018, so the issue will remain in those versions but it does not impact live sites, only Images section in admin.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...