Local Community

Certain images fail to display in 5.2.3 despite existing at the specified address

I’ve had a few problems in the upgrade process to 5.2.3+2448; the first was a port conflict on port 80 but I eventually got that resolved. Now I am stuck on another issue where certain images refuse to load in the environment in Local (but otherwise work perfectly fine on Flywheel itself). For example, on this part of our front page, in the dev environment the image doesn’t load:


On Flywheel itself the image loads perfectly fine:

In the web console in Chrome, the relative URL is set as /wp-content/uploads/2019/06/alumni-friends-background.jpg. Moreover, attempting to access this file in the browser is successful.


The only thing I can find in Local to clue me in to what’s going wrong is this orange popup that says “Warning! This site’s WordPress URL settings do not match the host set in Local.” However, the “fix it” button pretty much does nothing - it does something saying “provisioning”, but after it’s finished and I hard refresh the site or stop/start the site again in Local, the images still fail to load.

I’ve attached Local’s logs if they’ll be helpful. Nothing’s jumping out at me in here myself that seems related to the issue.

Any and all advice is appreciated!

local-lightning.log (294.7 KB)

I’m not an expert, but here are a couple of ideas for you…

  1. Look in Wordpress Settings > General and see what the WordPress Address and Site Address are. They should match the Site Domain in local (i.e., https://john-wood-community-college.local)
  2. Are you using SSL in Local? That might make a difference. For example if the site URL is “https://…” and Local is sending you to "http://…, that might make a difference.

Thanks for the ideas. It appears the WordPress Address and Site Address are both identical to Site Domain in Local (see previous screenshot for Local’s settings):

Maybe SSL is related here in some way to my issue, though? I have it enabled and the certificate is valid in Chrome. but Flywheel says that it isn’t being trusted which isn’t the behavior in Chrome. I’ll see if that road leads to anything. The thing is, all of the images are being loaded with https, so you’d think that if this was the problem, it wouldn’t be loading any images.

Also of note: it appears the images are loading on the WordPress backend just fine.

Turns out I was experiencing an issue related to different PHP versions. On Flywheel proper, we were using PHP 7.2, but Local was using PHP 7.3.5. Some htmlentities() function for some reason wasn’t working on the latest PHP version. Once I adjusted the PHP code dependent on that for the front page, the issue went away.

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.