mataroa-blog / mataroa

Naked blogging platform
https://mataroa.blog
GNU Affero General Public License v3.0
238 stars 21 forks source link

Allow "preload" attribute #31

Closed bpevs closed 1 year ago

bpevs commented 1 year ago

Background

Basically, for blog posts with heavy media content, it's a large load for a visitor to immediately download a lot of media.

The preload attribute lets us do things like:

I worked around this for the heaviest files by adding media via iframe, but this isn't really optimal for all the audio examples I have in these posts.

Changes

NOTE: I didn't test this or clone to my computer or anything, and didn't look too hard at the repo, so I'm not sure if there are other requirements here.

bpevs commented 1 year ago

oh btw, I don't think I can add reviewers, but @sirodoht ^ No rush, just tagging because I don't trust github notifications

sirodoht commented 1 year ago

Hey! That looks good, thanks!

sirodoht commented 1 year ago

@bpevs It should be working, I looked at the audio element you have there and it includes the preload="metadata" attribute.

bpevs commented 1 year ago

Thanks! I see it as well!