Images not being displayed after migrating site to local development server

[ad_1]

Hi there,

After migrating my site from Live to Dev (the same happened the other way around), my images no longer show up, for example on the photo gallery (it’s not just the photo gallery; the background image for my main Container also doesn’t show). It’s WordPress 6.2.2 and I’m using the built in editor.

My solution previously was to reload the images. It would be nice though to solve the root cause of this problem.

I’ve applied all the basic solutions as suggested on Google searches. I’ve done the find and replace on the URL and the site is working perfectly except for the images.

I decied to troubleshoot the problem and noticed the following on inspecting the web page. On Live and Dev the img tag looks quite similar; with a src= reference as follows: src=”data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==” ; this is a format I don’t recognize (I’m only familiar with a reference to a URL). I’m wondering if it’s some caching or lazy loading.

However, once (I think after clearing the cache) I noticed that the full URL for the image was in the “src=” attribute. Entering the full URL to the image in the address bar works on the Dev server and displays the image in the browser.

Here is how it looks for Live and for Dev. It looks much the same, but I’m including both anyway, just in case.

[Live])

​

[Dev])

I’ve also tried the following PHP code snippet in order to globally disable lazy loading but it had no effect:

add_filter( ‘wp_lazy_loading_enabled’, ‘__return_false’ );

Any assistance would be greatly appreciated. Please ask if further information is needed.

[ad_2]
1 Comment
  1. Have you tried finding out if there is a plugin responsible for converting image URLs to base64. If no plugin is responsible, try to switch the theme temporarily and see if it’s sorted. If yes, then you might want to track which part of the theme is making this change and disable it.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer