I’m trying to use the new “optimize on upload” in Kirby v4.0.1 as described here and here to resize images to a maximum width or height of 1980px but it doesn’t work.
/blueprints/files/image.yml looks like this:
title: Image
create:
width: 1980
height: 1980
crop: true
accept: image/jpeg, image/png
fields:
alt:
label: Alt Text
type: text
and i want to use it in my article template, /blueprint/pages/article.yml looks like this at that point:
files:
type: files
template: image
What am i doing wrong? I used the autoresize plugin in kirby v3, which still works, but i would still like to know how to get this new feature working.
Thank s for any hint.
I just found out that the file template is not being used. It falls back to default. When i add create to default.yml it works. Now i have to find out why the file-template is not being assigned on upload.
But that results in old articles not showing any images (because the template is default.yml, not image.yml) do i have to manually assign the image-template to old files (about 400 images in 65 pages) or rather use a new page-template for the upcoming articles? Or is there a better way? What would you suggest. Thank you!