#microformats 2020-04-13

2020-04-13 UTC
dsiypl4_, strugee, KartikPrabhu, shimmy1996, [LewisCowles], beko and [prtksxna] joined the channel
#
aaronpk
here's an interesting one... what's the best way to handle this kind of progressive enhancement / lazy loading of images with microformats
#
Loqi
Dries Buytaert
#
aaronpk
the src attribute on the img tag is a data URI with a low-res version of the image, the real image URL is in a data attribute that is swapped into the img tag via javascript
#
shimmy1996
Hi all - I'm in the process of adding mf2 to my sites, but I got varying instructions regarding how to handle p-name on notes: indiewebify.me suggest setting this to e-contents, while the mf wiki suggests against using a p-name at all. Which is the most dominant way?
#
aaronpk
ah that advice should be updated on indiewebify.me. the current best practice is to leave out the p-name for note posts, only including it for articles
#
shimmy1996
I see - thanks a lot!
gRegorLove__, KartikPrabhu, [LewisCowles] and mauz555 joined the channel
#
Zegnat
aaronpk: you could definitely provide a backup URL for mf2, but it will be awkward.
#
Zegnat
<data class="u-photo" value="https://example.com/image.jpg"><img data-real-src="https://example.com/image.jpg" src="https://example.com/lowres.jpg"></data>
[prtksxna] and [grantcodes] joined the channel
#
[grantcodes]
I use that exact data tag method on my galleries ☝
#
Zegnat
I wonder if there is a super clear data-* attribute that is shared by lots of sites, and if that would ever be worth integrating into mf2 parsing.
#
Zegnat
Although I guess the real solution is to wait for people to start switching to native lazy loading: https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Author_fast-loading_HTML_pages#Use_lazy_loading_for_images
#
[grantcodes]
I've seen `data-src` used by a decent number of lazy loading scripts. But that has been generally superceded by the native lazy loading and srcset and all that
#
Zegnat
native lazy load should take care of it for mf2 purposes. As it makes use of the normal src attribute. And I believe srcset parsing is already being discussed.
#
Zegnat
[grantcodes]: have you seen anyone do native lazy loading with the ability to show a placeholder (extra blurry) image?
#
[grantcodes]
No, I don't think that's possible
#
[grantcodes]
And I don't think it's necessary with the native way either. Maybe there is some advantage though
[jgmac1106] joined the channel
#
Zegnat
I do wonder how people do it for Schema. Or if they just don’t.
[LewisCowles], mauz555, [prtksxna], [Suw] and [snarfed] joined the channel
#
KartikPrabhu
Zegnat: I show a burred placeholder but don't have lazy loading, which I could just add I suppose
[Michael_Beckwi], gRegorLove__, [bonkerfield], KartikPrabhu, [snarfed], [KevinMarks], [grantcodes], [jgmac1106], jamietanna, jacky, [schmarty], [LewisCowles] and mauz555 joined the channel
#
GWG
gRegorLove: The alt PR... is that mergeable?
#
gRegorLove
I haven't had a chance to review
#
Loqi
gRegorLove: GWG left you a message 3 days, 8 hours ago: Now that I can, should I start merging PRs?
#
GWG
Okay
[Cheuk] and [Michael_Beckwi] joined the channel
#
gRegorLove
I will try to by tomorrow night
#
GWG
gRegorLove: No rush, just curious.