Is there a technical reason we aren't embedding alt text directly into images? It's weird that we're putting metadata that is clearly tied to the image itself into external systems, over and over again

@essentialrandom it can be done and apparently is/has widely been done per Wikipedia:

« Although IIM was intended for use with all types of news items — including simple text articles — a subset found broad worldwide acceptance as the standard embedded metadata used by news and commercial photographers. Information such as the name of the photographer, copyright information and the caption or other description can be embedded either manually or automatically.

[…]

Because of its nearly universal acceptance among photographers — even amateurs — this is by far IPTC's most widely used standard. On the other hand, the use of IIM structure and metadata for text and graphics is mainly limited to European news agencies. » en.wikipedia.org/wiki/IPTC_Inf

(the more contemporary XMP-based standard: <iptc.org/std/photometadata/spe>)

@essentialrandom my feeling is that editing XMP tags on images is something that does not have broad open-source/library support, and it's less web friendly (since you have to download the image before processing the metadata instead of getting the metadata first and then the image) so you won't see it in APIs over the internet

@Lady @essentialrandom mh yeah i was going to say i’d only be interested in alt text getting embedded as metadata if it somehow preserved the ability to retrieve alt text without the actual image for slow connections, limited data plans, & browsing old sites where 3rd party embeds have failed (ive been in all 3 situations at various points). and that seems logistically p difficult lol

@Satsuma @essentialrandom i mean it's still reasonable to:

• attach the metadata to the image in addition to sending just the metadata over the API, and

• autofill the image description when uploading an image with existing metadata

but nobody really does that

@Lady @Satsuma if the metadata is in the image, then you could """easily""" create code that extracts the alt text when the server sends down html/css and fills it where it should go

I wonder how much work it'd be to hack something together. Last time I worked with image metadata stuff it was a PITA, but I bet there's some obscure command line program that can do some of it.

@Lady I feel like with WASM we should be able to extract text from the image somewhat performantly client side nowadays

Follow

@essentialrandom do you mean OCR or extract embedded text in the image headers

(if the former, i think open-source OCR is kind of bulky and unreliable but web APIs for interacting with browser- or operating system-provided OCR may be coming!)

(if the latter, yes i believe it's just a matter of undoing the compression and reading the correct image headers, both of which should be pretty fast operations especially in WASM. if the headers are at the beginning of the image you could potentially do it while the rest was still downloading.)

@Lady I meant the second one! (But I also can't wait for better OCR)

My brain is like "this is the perfect project to nerd snipe Rust people with", too bad I don't know any :P We should post the project in fandom coders at least and see if anyone would want to hack around adding and removing it from images, even just server side.

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.