Tricky Problems Easy Solutions

Product image on frontend differs from the one in Magento admin

It often happens that some simple problem takes too much of our time. Because when we say “problem”, we expect a big problem, and we are already preparing for a great effort in solving it. But like in everything else, meaning and beauty is in its simplicity. When solving such a task it is necessary to start from basics. If we find a solution there, we have made it easier, if not, at least we have provided fertile ground for the continuation of the solution. Like in example below.


After you had changed the product image in Magento admin (Catalog-> Products-> Product-> Images And Videos) and had saved the changes, you encountered a problem because the change you made was not seen on the Product page and Category page of your WebShop.

You had ran the command php bin/magento cache:flush, you had tried to open WebShop in the incognito window but the image of the product on the frontend had remained unchanged. What probably happened was that you uploaded an image with the same name to the Magento admin as the image you wanted to replace (you could check this by inspecting the image in the admin and the one visible on the frontend and comparing the names), so Magento remembered an old image which had been used.

Sloution to the task

The solution of this issue was very simple. The image should been renamed and re-uploaded. If you didn’t have a new image locally, you should have downloaded, renamed, and uploaded it.