Bit of a strange one, but hopefully it's easy to resolve.

I have uploaded some product Category images to certain category pages in the Admin client but when I view them on the web they don't load. The reason appears to be that it is trying to load two paths in the src attribute, which are slightly different.

enter image description here

Any ideas what I need to do to resolve this... :-)


As you can see there are two paths in the URL, one has "tmp" (in bold) and if I modify the SRC this one loads. It appears that it is prepending the URL?

Any ideas would be appreciated.

src="/pub/media/catalog/tmp/category/25mm.jpg" <- This one loads the image?

  • do you know how to fix it now?thank you~
    – niceonelee
    Jun 30, 2020 at 15:51

1 Answer 1


This was related to the below fix.


I updated the below code on my site

file \Magento\Catalog\Model\Category\Attribute\Backend\Image.php

private function getUploadedImageName($value)
        if (is_array($value) && isset($value[0]['file'])) {
            return $value[0]['file'];
        if (is_array($value) && isset($value[0]['name'])) {
            return $value[0]['name'];
        return '';

The fact I have had to do this on a live site, on such a key part of the functionality is dumbfounding.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.