Magento2 pub is not showing in media URLs

1.3k Views Asked by At

I have a very strange issue in my site. When I access any of my product images, I can access by this type of url:

abc.com/media/catalog/product/0/1/0101-white.jpg

Whereas this image is at:

/var/www/html/pub/media/catalog/product/0/1/0101-white.jpg.

So I am wondering why I am not able to access my product images like this:

abc.com/pub/media/catalog/product/0/1/0101-white.jpg.

In the front end all product images are showing fine. But the issue is coming in Google Feed because Google Feed is giving this error:

image links are not found

because it is accessing images from the pub url

abc.com/pub/media/catalog/product/0/1/0101-white.jpg

So I want to access my product images with the pub url.

Is there anyone else facing this type of issue. It would be really great if someone can help me with this.

1

There are 1 best solutions below

1
sanvar mal Jat On

You can try to run following command and flush cache

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy