Announcement

#1 2020-11-21 21:18:54

jaker
Member
2020-11-21
3

Custom alt text?

Hi there

Bit of a newbie question but how do I add custom alt text to an image? I can see that Piwigo adds the "Original file" name as the alt text, but I would like to change it to an actual description of the image.

Thank you! Jake

Piwigo 2.10.2 Check for upgrade
Operating system: Linux
PHP: 7.0.33 (Show info) [2020-11-21 20:17:14]
MySQL: 5.5.5-10.2.33-MariaDB-log [2020-11-21 20:17:14]
Graphics Library: ImageMagick 6.9.10-68

Piwigo URL: https://forestgardengallery.uk/

Offline

 

#2 2020-11-21 21:45:40

erAck
Only trying to help
2015-09-06
2026

Re: Custom alt text?

It's the image's Title property.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2020-11-22 11:03:03

jaker
Member
2020-11-21
3

Re: Custom alt text?

> It's the image's Title property.

Yep, and the image's title is taken from the filename when you upload the file. However, when you change the Title, the alt text _doesn't_ change. Wondered if there is a way to change the alt text, or whether I'm best uploading the file with the alt text as the filename.

Thank you!

Offline

 

#4 2020-11-22 12:25:39

erAck
Only trying to help
2015-09-06
2026

Re: Custom alt text?

Indeed.. odd behaviour anyway, the alt attribute stays original file name, the title attribute is taken from the Title property (plus file name), but if the Description property is present then that is taken for the title attribute.

The original file name is stored in table piwigo_images field file and can be changed there, at least for images uploaded and in virtual albums where the file name is a different one; don't know if that field is used for physical albums, the actual path is stored in the path field.

But then again there are a few functions that actually use the file field (didn't investigate deeper), so changing its content might not be a good idea..


Running Piwigo at https://erack.net/gallery/

Offline

 

#5 2020-11-22 20:48:19

Katryne
Member
2016-12-03
369

Re: Custom alt text?

Hello !
Well, the alt attribute is supposed to give an alternate description for people with impaired vision or for indexing robots. Or even for ordinary visitors if for any reasons the picture cannot be displayed. I am not sure that my alt attribute made of the file name will help anybody.
What should be for any alt attribute is the short description if any, and if not a well written title.
How could this be done ?

Last edited by Katryne (2020-11-22 20:48:54)


http://photos.katrynou.fr/ v.14.1.0 https://album.chauvigne.info/ v.13.8.0
Système d'exploitation: Linux - Hébergeur 1&1-Ionos PHP: 8.0.28 - MySQL: 5.7.38
Bibliothèque graphique: External ImageMagick 6.9.10-23

Offline

 

#6 2020-11-22 22:09:21

jaker
Member
2020-11-21
3

Re: Custom alt text?

Thanks for the info :) From an accessibility & usability point of view, would be really handy to have an editable 'alt text' field, whether in the core software or as an extension. In the meantime, I'll upload the images with the alt text as the filename!

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact