new max image size: 1400

This commit is contained in:
madrilene 2025-02-26 16:47:25 +01:00
parent 07b337cb76
commit 4d4dbab01d
4 changed files with 4 additions and 4 deletions

View file

@ -58,7 +58,7 @@ export const markdownLib = markdownIt({
const attributes = token.attrs || [];
const hasEleventyWidths = attributes.some(([key]) => key === 'eleventy:widths');
if (!hasEleventyWidths) {
attributes.push(['eleventy:widths', '650,960,1200']);
attributes.push(['eleventy:widths', '650,960,1400']);
}
const attributesString = attributes.map(([key, value]) => `${key}="${value}"`).join(' ');

View file

@ -17,7 +17,7 @@ export const imageShortcode = async (
loading = 'lazy',
containerClass,
imageClass,
widths = [650, 960, 1200],
widths = [650, 960, 1400],
sizes = 'auto',
formats = ['avif', 'webp', 'jpeg']
) => {

View file

@ -71,7 +71,7 @@ The most basic version contains the path to the image (absolute) and alt text (c
{% endraw %}
It defaults to `loading = 'lazy'`, the picture element gets its set of images from `widths=[650,960,1200]` and compares to a condition of `sizes="auto"`.
It defaults to `loading = 'lazy'`, the picture element gets its set of images from `widths=[650,960,1400]` and compares to a condition of `sizes="auto"`.
You can pass in manually all the conditions, add `null` to skip. The arguments include classes for the outer container ( `<picture>` or `<figure>` element), and for the `<img>` element.
The shortcode is stored in `src/_config/shortcodes/image.js`.

View file

@ -20,7 +20,7 @@ That alone would not be a breaking change, but I decided to change the existing
loading = 'lazy',
containerClass,
imageClass,
widths = [650, 960, 1200],
widths = [650, 960, 1400],
sizes = 'auto',
formats = ['avif', 'webp', 'jpeg']
) => { ...