FYI, Style Pack does not specifically add “loading='lazy' decoding='async'itemprop="image". It’s being added elsewhere along the way. If you have any page-speed plugins activated, specifically for image loading speed-ups, they’re the most-likely culprits. Try deactivating those plugins one at a time and re-run w3 validator to see which plugin is doing it.
I do have Autoptimize, but the option for lazy loading images is unticked in that plugin.
I also have Convertor for Media that makes my images WebP. But there is nothing in the settings, nor in the plugin description that refers to lazy loading.
Finally, I have my one.com Performance Cache plugin.
I have asked Autoptimize because I did find decoding='async' in their code.
I’ve checked out both Autoptimize and WebP Converter for Media and don’t see either of them injecting the itemprop value.
I looked for the one.com Performance Cache plugin but I’m guessing that’s a default plugin that gets installed as a MU plugin for your hosting (not available in the WP plugin repo). That’s still suspect.
By chance are you running your site through a CDN like CloudFlare? Those are suspect too.
@codejp3 I switched the CDN off because it messed up my TinyMCE toolbar functionality. So I only have the caching side. It is in the plugins folder: onecom-vcache.
That does make it a suspect. However, I was not able to find anything that Varnish does specifically affecting images, so that makes it slightly less suspect.
Admin Menu Editor shouldn’t be affecting it.
It’s SOMETHING that’s lazy-loading images and setting them as asynchronous loading. That’s not the default action of the latest activity widget images, so it’s something external to Style Pack.
This reply was modified 3 years, 3 months ago by codejp3.
I thought I would provide you with the thorough feedback that I received from my theme provider:
What you are looking for is the get_avatar function.
The widget you mentioned, and other pages where you have th avatar like the ones below, all have the same coding. Single quotes (instead of double) and the missing space.
As for the missing space, it is due to the itemprop='image' attribute. This is once again, added by WordPress core itself ( via the filters in get_avatar_data function) – the $extra_attr variable in screenshot above at line#2897.
The reason no one bothers with single quotes and missing space is because developers stopped caring about validator.w3 long long time ago.
For example, the single quote is coming from WordPress core and not a theme or plugin.
Unless the validator states something is broken, syntax standards can sometimes be ignored.
As of now, the only way to fix this would be to overwrite WordPress’s core function using filters. However, this is never a good idea and generally not recommended.
I suppose we could add a custom filter to address this issue, and only apply it to the latest activity widget and wherever “is_bbpress()” returns true.
Probably add it as an optional “bbPress fix” since it’s not really a feature/styling element, and addresses a WP/bbPress core issue that most people don’t care about in the first place.
Even though it’s not actually resolved, I’m going to mark as resolved since the mystery is cleared up and it’s not directly a Style Pack issue.
I’ll keep this one in mind for a possible future update, but it’s not a top priority to be perfectly honest. Busy working on another large Style Pack revision and don’t want to spend time fixing non-Style Pack issues right now.