produces invalid html
-
theme is twenty-thirteen
w3c says…Element img is missing required attribute src.
it looks like you’re replacing ‘src’ with ‘data-src’ instead of adding it
also, i would agree with the other commenter – to ignore specified images a class attribute might be the way to go
should also have an option to ignore entry thumbnails, which i think you indicated is in the works
thanks!!!
-
I appreciate the feedback. In the next version release, I’ll add an empty src attribute to the <img> so that it still validates:
<img data-src="/path/to/image.jpg" src />The next version will also include the ability to specify classes to ignore lazy load and the ability to ignore post thumbnails.
I’ll work your suggestion into the next release, which ought to be soon.
hiya dbhynds
if you look at a3 Lazy Load, i believe you’ll find that it is inserting 2 populated source attributes (actually 1, its own – data-src -, and it’s leaving the other src intact) and w3c seems happy with it, except for a nesting problem in the attributes as i recalli honestly don’t know the proper way to do it, but i would presume that an empty attribute may not be correct (or validate). might be entirely wrong, but i think it should have both src and data-src
thanks for the reply – appreciated
have a good oneI tested it out, and you are correct… an empty src attribute doesn’t validate. I’m going to replace it with a 1×1 pixel transparent gif instead (nice and lightweight)
i don’t think you should do anything with the src attrib – if i’m correct, it should be left intact and you should only add the data-src attrib – see my post above
you might want to test a3 Lazy Load to see how it works
again, i could be wrong π
there may also be other problems with PageSpeed/YSlow if you add a 1px transparent img, but i’m totally not sure about that one
Leaving the src attr intact means that the original image will start begin downloading when document is loaded, which defeats the purpose of having them lazy load. See https://github.com/ressio/lazy-load-xt#usage for how they recommend doing the markup.
I’m not an expert on PageSpeed or YSlow… can you explain what the potential problem with a 1px transparent gif might be?
i’m no expert with PageSpeed/YSlow either, but i know that when you have a bunch of small images, they recommend creating a sprite instead
however, thinking more about this, you’re only using 1 image, so it may not matter
according to the doc you linked to, the 1px image may not even be needed
whatever you decide, i’ll be happy to beta test it before you release if you want
Ah… that shouldn’t be a problem for PageSpeed. Since it’s the same image file, the browser will cache it. Sprites are for if you have a bunch of different images files. Since this is just a single one, you shouldn’t get penalized.
Troubleshooting one last bug, but almost have 0.2-beta ready. It’d be great if you could beta test it. How should I deliver the files for you?
looks like the easiest way is to make sure it’s available here at:
ww.wp.xz.cn/plugins/lazy-load-xt/developers/
or dropbox if you have an account
or you can contact me and we can do it through email
12bytes.org/contactAlright. Added 0.2-beta as the development version. Duh, but don’t test on a production enviro.
that’s all i got π
what potential problem(s) might there be?I’m still working on the settings when installing/upgrading. There’s a chance that when I finally do release a future version that saved/default settings will get overwritten by what’s in the current dev version. Then again, that’s going to be true anyway until I feel the plugin is ready for v1.0.
I don’t anticipate any problems, I just wanna add that disclaimer.
it’s installed and seems to be doing ok – w3c is happy with it, both with images and embeds – no errors or warnings in the browser console
usually i’m all for dumping multiple plugins for a one which serves multiple purposes, but in this particular case i might humbly suggest either lightening your load and removing the minify function, or disabling it by default
a lot of people use minify/caching plugins (Better WordPress Minify in my case) and i just wonder if there might be conflicts with yours which might result in unfounded 1 star reviews because they didn’t disable one of them??? i don’t think most would expect a lazy-loader to handle minification
if i have any problems i’ll surly report back, but all looks good so far
I appreciate the testing. Glad it’s working for ya.
The minimizing function doesn’t minify any other javascript files on your site. It just loads minified version of the Lazy Load XT js and css instead of the full development versions. For instance, it loads jquery.lazyloadxt.min.js instead of jquery.lazyloadxt.js.
If you run into any trouble, let me know. I think I’ve got 0.2 about wrapped and ready to release early next week.
ok gotchya
i enabled loading the min versions and moved them to the footer and all is looking good so fari’ll be back with any problems if any
thanks for your work!!!
Just released v 0.2 and incorporated your feedback. Thanks!
The topic ‘produces invalid html’ is closed to new replies.