Page 1 of 1

Images are not displayed on my site

Posted: Sat Jul 25, 2020 3:02 am
by myVesta
Possible reasons:
  • You are loading images from http while you are loading site from https
  • Your CMS is rewriting URL of images/static files

Re: Images are not displayed on my site

Posted: Sat Jul 25, 2020 3:05 am
by myVesta
You are loading images from http while you are loading site from https

You should check page source to see if this is really happenning.
If yes, you can migrate site database to https using v-migrate-site-to-https script.

Re: Images are not displayed on my site

Posted: Sat Jul 25, 2020 3:05 am
by myVesta
Your CMS is rewriting URL of images/static files

In this case go to:

Web -> Edit (domain) -> Proxy template -> hosting-legacy

hosting-legacy template will pass requests for non-existent static files to Apache (where .htaccess will resolve it with mod-rewrite)

hosting template will NOT pass requests for non-existent static files to Apache.

When you have shared server with lot wordpress sites, it's common that some sites is linking image files that does not exists.

Well, all those http requests (to non-existent static files) goes then to Apache and then to PHP-FPM, and then the whole WordPress will be initialized, with mysql connection to mysql... just in order to say "Ahhh, it's really 404".

Now imagine wordpress site with 10 non-existent images per page.... with visitors every second.

That's 10 requests to wordpress per second.

So, this new hosting template will save a lot of CPU time on shared hosting server.

We are just explaining why we modified default hosting template.


Conclusion... if your CMS uses mod_rewrite to route images/CSS/JS, just put hosting-legacy template - and everything will works like in Vesta/Hestia.