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