Images are broken in feed

Hi!

I can’t get blogs from United Bloggers to work correctly (self hosted). The images are broken, and it seems like an issue with encoding?

Two test feeds:
http://www.julianyland.com/feed/
http://www.anettemarie.no/feed/

Is there anything I can do? Any help is greatly appreciated :slight_smile:

Hi Frank,

Sorry for the late reply.

This is an issue with lazy loading of images. Sites use this technique to improve performance or reduce bandwidth costs. It works by relying on Javascript to load the image (usually when the site detects that you’re about to reach it within the document) rather than loading everything when your browser loads the page. In this case the markup looks as follows:

Skjermbilde 2015-06-11 kl. 00.52.24-2

The

src=“data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==”

is actually a simple 1x1 pixel image

The actual image is in this attribute:

data-src=“http://uploads.unitedbloggers.no/uploads/sites/69/2015/06/Skjermbilde-2015-06-11-kl.-00.52.24-2-1024x574.jpg

You can fix this with a simple string replacement inside a site config file. If you want it to apply to all United Bloggers sites, I suggest you add the following to site_config/custom/global.txt

find_string: src=“data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==”
replace_string: nothing-here-src=""

find_string: data-src="http://uploads.unitedbloggers.no
replace_string: src="http://uploads.unitedbloggers.no

Let me know how you get on.

Thanks!

Works great :slight_smile:

Frank Karlsen