Images not being processes

So I have 2 file blueprints on my site, default.yml and image.yml, the image blueprint is exactly the same as the default one, except it adds image processing. However, it’s not being honoured.

Here’s my /blueprints/files/image.yml file:

title: Media Editor

create:
  width: 1200
  crop: false
  format: webp
  
columns:
  - width: 1/2
    sections:
      content:
        type: fields
        fields:
          caption:
            label: Caption
            type: textarea
            size: medium
  - width: 1/2
    sections:
      meta:
        type: fields
        fields:
          alt:
            label: Alternative Text
            type: text
          loading:
            width: 1/2
            label: Loading
            type: select
            options:
              lazy : lazy
              eager: eager
          class:
            width: 1/2
            label: CSS Class
            type: text

My default.yml file is exactly the same, except it doesn’t include these lines:

create:
  width: 1200
  crop: false
  format: webp

But images aren’t being processed. When I upload a jpeg file, it stays as a jpeg and full size. However, if I add the create: section to my default.yml images are processed correctly (formatted to webp and reduced to 1200px wide). So I know it’s not a server issue.

It seems to me that the image.yml file is just being ignored for some reason and default.yml is taking priority.

I can’t keep the create: section in my default.yml file, as it will then apply the same changes to other media I upload, like videos.

Any ideas on what I’m doing wrong here?

Thanks,

Kev

Check if GD or IM (which ever you are using) is installed and enabled. GD needs to be a certain version and above to process Webp images. It might be you have an old version on the server.

Like I said, image processing works fine when I put the correct instructions in default.yml. This is not a server dependancy issue.

It’s an issue with Kirby ignoring the image.yml file for some reason.

Could you please post the blueprint where you assign the image blueprint?

I’ve tested it with multiple page blueprints and it doesn’t work on any of them. Here’s a couple of examples though:

/blueprints/pages/note.yml:

title: Notes
icon: draft

create:
  title: "{{ site.pretty-time }}"
  slug: "{{ site.time }}"

columns:
  main:
    width: 2/3
    sections:
      fields:
        type: fields
        fields:
          text:
            type: textarea
            size: medium
            maxlength: 500
          uploads:
            label: Uploads
            type: files
            layout: cards
            limit: 4

  sidebar:
    width: 1/3
    sticky: true
    sections:
      meta:
        type: fields
        fields:
          published:
            label: Published Date
            type: date
            display: DD MMMM YYYY
            time: true
            default: now

/blueprints/pages/article.yml:

title: Blog Posts
num: '{{ page.published.toDate("Ymd") }}'
icon: book

status:
  draft:
    label: Draft
    text: The post is still in draft. It's not available on the site and can only be accessed via the panel.
  unlisted:
    label: Unlisted
    text: The post is online, but can only be seen with a direct link.
  listed:
    label: Published
    text: The post is online and listed in the blog.

columns:
  main:
    width: 2/3
    sections:
      fields:
        type: fields
        fields:
          text:
            label: Post Contents
            type: markdown
            size: huge
            default: <p class="tldr">...</p>
  sidebar:
    width: 1/3
    sticky: true
    sections:
      meta:
        type: fields
        fields:
          description:
            label: Post Description
            type: text
          published:
            label: Published Date
            type: date
            display: DD MMMM YYYY
            time: true
            default: now
          tags:
            label: Post Tags
            type: tags
            options:
                - AMA
                - Blogging
                - Books
                - DeGoogling
                - FatBoy
                - FishKeeping
                - Fun
                - HomeLife
                - Link
                - Meta
                - Notes
                - Opinion
                - PenPal
                - Privacy
                - Security
                - StoryTime
                - Technology
                - Watches
                - Web
      uploads:
        label: Uploads
        type: files
        limit: 6
      notes:
        type: fields
        fields:
          notes:
            label: Post Notes
            type: markdown
            size: medium

You do not assign any file blueprints anywhere in these two files fields (only ones I saw).

  uploads:
        label: Uploads
        type: files
        limit: 6
    uploads:
            label: Uploads
            type: files
            layout: cards
            limit: 4

Maybe re-read the docs: Files | Kirby CMS