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. » https://en.wikipedia.org/wiki/IPTC_Information_Interchange_Model
(the more contemporary XMP-based standard: <https://iptc.org/std/photometadata/specification/IPTC-PhotoMetadata-2022.1.html>)
@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
@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.
@essentialrandom @Lady @Satsuma The default Obscure Command-Line Program for working with metadata is `exiftool`, iirc.
(At least, that's what I use.)
(Like all free software projects named for one specific usecase, it has the capability to work with many more frameworks than just EXIF.)
@essentialrandom @gaditb @Satsuma https://github.com/nitmws/get-iptc-pmd (linked from the exiftool page) may be a helpful toy?
@essentialrandom @gaditb @Satsuma as an aside, i love it when the answer to a technical question is “yeah there’s a whole ecosystem of programmer folks who have experience in this subject area, they just don’t ever talk to the people writing web apps” lol
i mean this sincerely; programming is a way bigger landscape than the view from the web and i love catching glimpses of other lands
@Lady @essentialrandom @Satsuma From the looks of it I think the exiftool people just Really Like Metadata.
And they're FREAKING RIGHT.
@Lady @essentialrandom @Satsuma ... that said skimming through their "heck yeah let's dump everything in" self-managed format
https://exiftool.org/TagNames/MIE.html
they don't seem to have (unless I missed it) a specific privileged/canonically-labeled spot for "image description". (Although obviously they have space where you can ad-hoc put it.)
This seems like something that could be a project, maybe. (Bugging them, then other formats, and connecting all the slots canonically.)
Hmm.
(Also possibly I just missed it.)
@essentialrandom @gaditb @Satsuma IPTC *does* have an alternate text field so that might be the place to start
@Lady @essentialrandom @Satsuma Ooh, they have separate "Alt Text (Accessibility)" and "Extended Description (Accessibility)".
I* like this a lot, I think.
(*Disclaimer: I do not regularly use text descriptions for accessibility purposes, and my aesthetic tastes should not be taken as judgements on the quality of these design patterns for their primary usage.
... although hopefully whoever wrote these guidelines, for that usage, did the research.)
@essentialrandom @Lady @Satsuma I think it might also be a perl library that goes with it, so if you wanted to incorperate it into your contemporary social network app you are maintaining which is a webapp server written in perl in 2022 for some reason then (a) congrats and (b) I don't know whether Dreamwidth is hiring but it probably wouldn't hurt to check.
@essentialrandom @Lady @Satsuma ... or I'm pretty sure Dreamwidth is the only ones running perl in user-facing production nowadays, at least.
I wonder if I should be scared to check.
@gaditb@icosahedron.website @essentialrandom@indiepocalypse.social @Lady@cat.family @Satsuma@cat.family well all the LJ-based systems are - so LJ, DW, DeadJournal, InsaneJournal
(Also DW doesn't make enough money to hire people, but we always welcome new volunteers :D)
but also, we live in the future now, clearly: https://webperl.zero-g.net/
@essentialrandom@indiepocalypse.social I mean, you know one Rust person (even if I am a mere larval Rusteacean)
@cocoa but can I need snipe you into building WASM tools for image manipulation? :P
@essentialrandom@indiepocalypse.social I mean. Maybe? I've never done cross-compilation to WASM but I'm willing to give it a try, particularly if you have a fairly good idea of what the functionality should be.
@cocoa I'll keep it in mind! I think right now I'll be trying to do this server side and figure out how to do it by digging into that express server that @Lady linked. But if this thing really works, I think having a WASM thing to both save and extract the alt text would be very useful.
And, in general, I wanted to use something similar to e.g. embed information about a webring directly into the "I am part of this webring" badges, so we can make it very easy to carry that metadata around. We'll have to see how intensive the operation is on people's devices, but if we can get it to work for this I bet there's other cool stuff we can expand this mechanism for.
@essentialrandom@indiepocalypse.social Yeah, it's definitely a neat idea! And I want to play around in Rust more because it's a good way to build close-to-the-metal standalone stuff (you know I love python, but distributing python things to non-Python people is. Challenging.)
@cocoa if I had time to play with Rust I'd totally do it. It seems like it's easy to bridge between Rust and JS, and some tools in the JS ecosystem are moving towards a core in Rust with the possibility of writing plugins in JavaScript. That to me is the best of both worlds cause you can have the performance of Rust, while making it possible to use the same language across the stack, which is important to me in terms of lowering barriers of entry to different layers and helping people share tools with each other.