Images use IP address some times

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Hi, does anyone else have this issue? Sometimes when I go to my website the images do not display. When I Inspect it, the URLs to the images are the IP. If I clear the cache and restart the app, it doesn't do anything. I have to log onto my VPS, stop my website, recycle the app pool, then start my website....No idea why...

5 years ago
Hello,

The images get cached by the store URL. So if the Store URL setting in your store (Administration -> Configuration -> Stores) is different from your actual store url your pictures might be cached to the value of the setting.
Fixing that setting and clearing your cache should fix your problem

Hope that helps!

Regards,
Anton
5 years ago
Hi Anton,

I have a related question.  Doing the optimization of our shop, Chrome's Lighthouse suggests to serve images either from a CDN (which I would not prefer) or at least from a cookieless URL.  I would setup a subdomain, like content.mydomain.com on our server for this and move all the images there.

How difficult would that be to implement in the code?
5 years ago
Nop-Templates.com wrote:
Hello,

The images get cached by the store URL. So if the Store URL setting in your store (Administration -> Configuration -> Stores) is different from your actual store url your pictures might be cached to the value of the setting.
Fixing that setting and clearing your cache should fix your problem

Hope that helps!

Regards,
Anton


thanks, yeah that's the thing. I think I have it setup correctly...right?

5 years ago
A.M. Any thoughts?
5 years ago
dootchie wrote:
Hello,

The images get cached by the store URL. So if the Store URL setting in your store (Administration -> Configuration -> Stores) is different from your actual store url your pictures might be cached to the value of the setting.
Fixing that setting and clearing your cache should fix your problem

Hope that helps!

Regards,
Anton

thanks, yeah that's the thing. I think I have it setup correctly...right?




As you tick the ssl checkbox. So give the secure link of the shop. You must have the SSL certificate at the server. Then you have to enable "Force SSL for all site pages" from general setting. Otherwise, your cart,checkout, login and admin panel will not work.

If you do not have ssl certificate then simply uncheck the ssl and do not need to check the "Force SSL for all site pages" from the general setting.

After complete this setup, you need to clear your cache from admin side.
5 years ago
Thanks, I do have SSL. Here are the new settings in 4.10. I changed my "Store URL" to include https, instead of http. I'll give it a shot.

5 years ago
Till nopcommerce4.0 there was an extra text(Secure URL) and it opened when admin checks the "SSL enabled" checkbox but at current version i.e nopcommerce4.1 I do not see this option. I am a little confused about this. At Nopcommerce admin demo site, the input textbox also not showing.

I think it is ok. Because the field also not exists at the Database. And it is by design.
5 years ago
Yeah I thought that was a little weird too. I dont see any console errors in Chrome Debug. Wonder if they just removed it?
5 years ago
dootchie wrote:
Yeah I thought that was a little weird too. I dont see any console errors in Chrome Debug. Wonder if they just removed it?


I think you should go with this setting. Because the GetStoreHost method have some changes at nopcommerce4.1. The setup is ok, go for it.

Yes, the field no more needed.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.