0

Just moved a Magento 2 site from a test hosting domain to my local PC. Everything is ok except Magento logo and icons (cart, envelope inside the email subscribe form, search icon,etc) dont show on frontend. On backend there are no problems. Product images in product pages dont load. However, they load ok in catalog pages.

I have already flushed cache, deleted pub/static folders, run deploy:static-content:deploy.

I found that the file var/resource_config.json still points to the test domain url:

{"media_directory":"\/chroot\/home\/test.domain\/html\/pub\/media\/","allowed_resources":["css","css_secure","js","theme","favicon","email","wysiwyg","tmp","catalog","custom_options","dhl","captcha"],"update_time":"3600"}

Is it ok to edit this file manually?

enter image description here

1

I would have suggested flushing and refreshing the Cache as well. It's quite strange that this is working for the Backend but not the Frontend.

Unfortunately, I can't answer the question about the config file, sorry. Hopefully someone else here can.

0

I had this problem too because I do not have an SSL certificate set up on my site.

If you inspect element over where the image should be it'll say that it's trying to get the image through an https connection. If you go on to the admin panel, stores>configuration>web>base URL's (secure) and set "Use Secure URLs on Storefront" to "No".

it will stop trying to connect through https if that's your issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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