Page 1 of 1

No img src but data-src-fg on a WordPress site

Posted: Thu Apr 26, 2018 6:48 am
by ajtruckle
I am working on my Wordpress website and I started to run it through HTML Validator.

A repeated error was consistently raised:

Code: Select all

Error in line 639 at character 304: The "img" element (with class="fg-image") requires the "src" attribute.
So, I looked at one of the places this was raised:

Code: Select all

 <img  title="Ribbon" width="100" height="100" data-src-fg="" class="fg-image" />
I see that it has it's own

Code: Select all

but no

Code: Select all

entry. This code is created by the FooGallery plugin. I have not yet asked there about this issue because I don't know much about Wordpress mechanics.

I don't see any setting in the options for the media to specify this:


Logic tells me that it is a setting specified automatically. Anyway, what I am asking is that technically, a src parameter is being specified. It is just not called "src". Is this a issue I need to raise with the plugin developer?

Re: Using SEO Validation with a WordPress site

Posted: Thu Apr 26, 2018 8:59 am
by Albert Wiersch
Hello Andrew,

In the next update, CSS HTML Validator will generate this warning:
Even though this "img" (with class="fg-image") element has a "data-src-fg" attribute, it still technically requires an "src" attribute. This message is displayed up to 5 times.

You can disable that warning if you want, but note that technically "img" elements should have an "src" element. Here is more info: ... t-just-src

So you may want to bring it up with the plugin developer... but even though it's not technically correct, it probably works "well enough" for the vast majority of people (assuming the plug-in has been thoroughly tested).

I doubt this has any significant effect on SEO but only the search engines would know for sure.

Re: Using SEO Validation with a WordPress site

Posted: Thu Apr 26, 2018 9:05 am
by ajtruckle
Ok, I have raised it here: ... ttributes/

I also raised the query about the long lines of code (7000+ characters): ... n-warning/