Alt texts disappearing from the Media Library

The alt texts I write for pictures added to the Media Library keep disappearing. It's not the 1st time, but it's on and off. I have to do it manually afterwards and it's quite a problem.

Hi @samia.honein,

To better understand what’s happening, could you please try to replicate it and record it with Jam? It will give us the dev information needed to debug, and you can remove it once you’re done.

Thank you for your help :slight_smile:

Hi,
Here, that's the best that I can do to show how it look when I add a photo to an article on Prismic:

https://jam.dev/c/ac3623de-3b5e-4613-a3ca-082a5630563c

So if I understand correctly, if you go to this same image from the recording in your media library, it already has alt text saved there?

You mentioned it was on and off, is there any kind of pattern you've noticed (type of picture, when it was uploaded, happening on a specific page/slice, etc)?

So I uploaded images to the Media Library, with alt texts and Private Notes. But when I tried uploading the image from the Media Library to the article, as you can see, there's no Alt text so I add it again before clickung on Upload. Not all images are like that, but I can't tell why some and others not

Thank you for the details.

Can you take the exact same image in your example (tipps-table-comment-decorer-maison-noel-home24), and confirm you can see the alt text for it in the Media Library (and take a screenshot/recording if possible)? I'm not able to recreate this on my side: the image that doesn't have alt text in the page also doesn't have alt text in the Media Library.

Hi,
So I'm sending you this now:

https://jam.dev/c/e5ea285c-71f7-4bdb-a931-8bc9d02acb56

I added a comment that those are 2 sets of pictures for 2 different articles, uploaded at different times. As you can see, some still have their Alt texts, some not, so I have to add them again. The one I showed you before and that you mention has kept its Alt Text after I added it manually to the image while adding it to the article. I hope that's clear and not too confusing. Please let me know if that's the case.

Hi again,

Thank you for clarifying! You're making sense, apologies for my misunderstanding. How are you uploading them and adding the alt text before they're added to the Media Library? Is it individual images, or are you migrating them in batches, something like that?

Hi,
So I upload a number of (already named) images in the Media Library, then add the alt text and private notes. That's the only information I add to the Media Library. I then proceed to add them to the article in Prismic.

Hi,
So I created a new jam because the problem continues but I found something new:
https://jam.dev/c/8fa0a543-e034-4143-8955-c0c803a6b232
You will see I alternate between "All uploaders" and my name (many people upload daily, so clicking my name helps me find my pictures easily and there's no way I don't use that feature). When I do that, the alt text disappears, as you can see in the video.
I hope that helps

1 Like

Hi @samia.honein,

That new Jam recording was really helpful, thank you! I think I figured out what's happening.

If you look at your Jam recording, you can see there's little 400 errors popping up when you put in your alt text. In the console, you see the error "error": "Validation failed: body /alt must NOT have more than 500 characters", and your alt text doesn't save. This explains why when you reload the Media Library to see media by uploader, the alt text disappears. While you're still on the "all uploaders", the alt text likely doesn't "refresh", which means it appears as if the alt text is there still. In reality, it just never saved. This also explains why it's happening on and off: sometimes your alt text is below 500 characters and you don't encounter this issue at all.

The way this is displayed on our Media Library isn't ideal. I'm going to create bug report so that an error in saving alt text is displayed, which should reduce confusion. In the meantime, this is what you should see when your alt text gets saved properly:

If you don't see this pop up, you can check the console for an error if you can and it should tell you what's wrong, but it will likely be the length of the alt text. And if it continues happening, just reach out and we'll help you out :slight_smile:

Hi Ezekiel,
Ah yes, I have seen the "Media metadata has been saved" display, so will pay extra attention to that.
Other than that, if I understand you correctly, the issue is the length of my alt texts? I'd like to write the alt texts that I want though, it's a shame. Thank you for the explanation though, appreciate it.

Yes, the issue is the length. It's currently 500 characters for us. For accessibility reasons, traditionally alt text does need to be concise. We do have the same character limit for copyright/private notes/file name as well.

You're welcome :slight_smile:

Thank you, I'm reworking some alt texts as we speak.

1 Like