Do I have an option in Kirby to specify the width of a specific image in the folder without checking in the code the name of the image and resizing it.
do you want to define a value for a width somewhere and when creating the gallery all images are a) resized and/or b) have their width attribute set to that value?
like @texnixe suggested storing the target width at the files metadata is good idea. it can be read just like any other file field.
actually resizing the image, not just setting the width attribute is done using the $file->resize($width) file method.
using the width attribute is not very flexible in the long run since its very hard for other styles like from css to override it. consider using the style attribute instead. style="width:123px;"
Thanks for this - I’ll give it a try in the morning.
I only need to change a few of the image sizes - not all - how do I check if a file meta data exists for an image?
Thanks