new max image size: 1400
This commit is contained in:
parent
07b337cb76
commit
4d4dbab01d
4 changed files with 4 additions and 4 deletions
|
|
@ -58,7 +58,7 @@ export const markdownLib = markdownIt({
|
||||||
const attributes = token.attrs || [];
|
const attributes = token.attrs || [];
|
||||||
const hasEleventyWidths = attributes.some(([key]) => key === 'eleventy:widths');
|
const hasEleventyWidths = attributes.some(([key]) => key === 'eleventy:widths');
|
||||||
if (!hasEleventyWidths) {
|
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(' ');
|
const attributesString = attributes.map(([key, value]) => `${key}="${value}"`).join(' ');
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ export const imageShortcode = async (
|
||||||
loading = 'lazy',
|
loading = 'lazy',
|
||||||
containerClass,
|
containerClass,
|
||||||
imageClass,
|
imageClass,
|
||||||
widths = [650, 960, 1200],
|
widths = [650, 960, 1400],
|
||||||
sizes = 'auto',
|
sizes = 'auto',
|
||||||
formats = ['avif', 'webp', 'jpeg']
|
formats = ['avif', 'webp', 'jpeg']
|
||||||
) => {
|
) => {
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ The most basic version contains the path to the image (absolute) and alt text (c
|
||||||
|
|
||||||
{% endraw %}
|
{% 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.
|
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`.
|
The shortcode is stored in `src/_config/shortcodes/image.js`.
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ That alone would not be a breaking change, but I decided to change the existing
|
||||||
loading = 'lazy',
|
loading = 'lazy',
|
||||||
containerClass,
|
containerClass,
|
||||||
imageClass,
|
imageClass,
|
||||||
widths = [650, 960, 1200],
|
widths = [650, 960, 1400],
|
||||||
sizes = 'auto',
|
sizes = 'auto',
|
||||||
formats = ['avif', 'webp', 'jpeg']
|
formats = ['avif', 'webp', 'jpeg']
|
||||||
) => { ...
|
) => { ...
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue