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
> 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
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..
Offline
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)
Offline
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