Home > Net >  WordPress: Images and other assets not loading on localhost
WordPress: Images and other assets not loading on localhost

Time:07-26

First of all, a cordial greeting, friends! I have a problem, I am working with the design of a web page using WordPress via localhost with XAMPP. I have tried to view the project from different devices (cellphones, tablets) and by configuring the file httpd-XAMPP.config I have managed to enter the address correctly of the project.

The problem is that no image, icon, or logo that I have placed on the page loads (as seen in the attached image), the menu button does not work either.

With nothing more to add and thanking you in advance for any help you can provide, I say goodbye.

Screenshot of website with broken image

CodePudding user response:

Have you checked the image path to see if it's correct? Are you able to access the image from the full path in a browser for example domain.com/wp-content/uploads/image.png like this?

CodePudding user response:

Probable solution 1: Most of the cases, it can be the permalink issue. Please try to check by changing the permalink, first make it Plain Text and check, if it's not working then make it Post Name and then check. (To do it go to Admin dashboard > Settings > Permalink)

Probable solution 2: Sometimes, if the image and CSS do not exist in the correct location then happen this kind of issue. Please check it.

Probable solution 3: Put it in the config.php file

 define('WP_HOME','yourdomain.com');
 define('WP_SITEURL','yourdomain.com');

Thank you

  • Related