Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename all eri-* attributes and classes to ri-* #664

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/nasty-bobcats-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@responsive-image/build-utils': minor
'@responsive-image/vite-plugin': minor
'@responsive-image/webpack': minor
'@responsive-image/ember': minor
---

Rename all `eri-*` attributes and classes to `ri-*` for consistency
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ Rendering this component will generate an `<img>` element wrapped in `<picture>`
<img
src="1920"
height="1280"
class="eri-responsive"
class="ri-responsive"
loading="lazy"
decoding="async"
/>
Expand Down Expand Up @@ -311,7 +311,7 @@ and additionally a `2x` variant for devices with high pixel densities:
src="/assets/images/hero320w.jpg"
width="320"
height="213"
class="eri-fixed"
class="ri-fixed"
loading="lazy"
decoding="async"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ module("Integration: Responsive Image Component", function (hooks) {
<template><ResponsiveImage @src={{testImage}} /></template>,
);

assert.dom("img").hasClass("eri-responsive");
assert.dom("img").hasNoClass("eri-fixed");
assert.dom("img").hasClass("ri-responsive");
assert.dom("img").hasNoClass("ri-fixed");
});

test("it renders width and height attributes", async function (this: RenderingTestContext, assert) {
Expand Down Expand Up @@ -236,17 +236,17 @@ module("Integration: Responsive Image Component", function (hooks) {
</template>,
);

assert.dom("img").hasClass("eri-fixed");
assert.dom("img").hasNoClass("eri-responsive");
assert.dom("img").hasClass("ri-fixed");
assert.dom("img").hasNoClass("ri-responsive");

await render(
<template>
<ResponsiveImage @src={{testImage}} @height={{100}} />
</template>,
);

assert.dom("img").hasClass("eri-fixed");
assert.dom("img").hasNoClass("eri-responsive");
assert.dom("img").hasClass("ri-fixed");
assert.dom("img").hasNoClass("ri-responsive");
});

test("it renders width and height when given", async function (assert) {
Expand Down Expand Up @@ -558,8 +558,8 @@ module("Integration: Responsive Image Component", function (hooks) {
<template><ResponsiveImage @src={{defaultImageData}} /></template>,
);

assert.dom("img").hasClass("eri-responsive");
assert.dom("img").hasNoClass("eri-fixed");
assert.dom("img").hasClass("ri-responsive");
assert.dom("img").hasNoClass("ri-fixed");
});

test("it renders width and height attributes when aspect ratio is known", async function (this: RenderingTestContext, assert) {
Expand Down Expand Up @@ -692,8 +692,8 @@ module("Integration: Responsive Image Component", function (hooks) {
</template>,
);

assert.dom("img").hasClass("eri-fixed");
assert.dom("img").hasNoClass("eri-responsive");
assert.dom("img").hasClass("ri-fixed");
assert.dom("img").hasNoClass("ri-responsive");
});

test("it renders width and height when given", async function (assert) {
Expand Down
24 changes: 12 additions & 12 deletions apps/ember-vite/tests/acceptance/local-images-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module('Acceptance | local images', function (hooks) {

assert
.dom('[data-test-local-image="responsive"]')
.hasClass('eri-responsive')
.hasClass('ri-responsive')
.hasAttribute(
'src',
new RegExp(`/assets/aurora-[0-9]+w(-[a-zA-Z0-9-_]+)?.jpg`),
Expand Down Expand Up @@ -47,7 +47,7 @@ module('Acceptance | local images', function (hooks) {

assert
.dom('[data-test-local-image="fixed"]')
.hasClass('eri-fixed')
.hasClass('ri-fixed')
.hasAttribute(
'src',
new RegExp(`/assets/aurora-640w(-[a-zA-Z0-9-_]+)?.jpg`),
Expand Down Expand Up @@ -82,8 +82,8 @@ module('Acceptance | local images', function (hooks) {

assert
.dom('[data-test-local-image="fixed,lqip-color"]')
.hasClass('eri-fixed')
// .hasClass('eri-lqip-color')
.hasClass('ri-fixed')
// .hasClass('ri-lqip-color')
.hasAttribute(
'src',
new RegExp(`/assets/aurora-640w(-[a-zA-Z0-9-_]+)?.jpg`),
Expand Down Expand Up @@ -118,9 +118,9 @@ module('Acceptance | local images', function (hooks) {

assert
.dom('[data-test-local-image="fixed,lqip-color"]')
.hasClass('eri-fixed')
// .hasClass('eri-lqip-color')
// .hasClass('eri-dyn-0')
.hasClass('ri-fixed')
// .hasClass('ri-lqip-color')
// .hasClass('ri-dyn-0')
.hasAttribute(
'src',
new RegExp(`/assets/aurora-640w(-[a-zA-Z0-9-_]+)?.jpg`),
Expand Down Expand Up @@ -154,9 +154,9 @@ module('Acceptance | local images', function (hooks) {

assert
.dom('[data-test-local-image="fixed,lqip-inline"]')
.hasClass('eri-fixed')
// .hasClass('eri-lqip-inline')
// .hasClass('eri-dyn-1')
.hasClass('ri-fixed')
// .hasClass('ri-lqip-inline')
// .hasClass('ri-dyn-1')
.hasAttribute(
'src',
new RegExp(`/assets/aurora-640w(-[a-zA-Z0-9-_]+)?.jpg`),
Expand Down Expand Up @@ -190,8 +190,8 @@ module('Acceptance | local images', function (hooks) {

assert
.dom('[data-test-local-image="fixed,lqip-blurhash"]')
// .hasClass('eri-fixed')
// .hasClass('eri-lqip-blurhash')
// .hasClass('ri-fixed')
// .hasClass('ri-lqip-blurhash')
.hasAttribute(
'src',
new RegExp(`/assets/aurora-640w(-[a-zA-Z0-9-_]+)?.jpg`),
Expand Down
24 changes: 12 additions & 12 deletions apps/ember-webpack/tests/acceptance/local-images-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module('Acceptance | local images', function (hooks) {

assert
.dom('[data-test-local-image="responsive"]')
.hasClass('eri-responsive')
.hasClass('ri-responsive')
.hasAttribute(
'src',
new RegExp(`/images/aurora-[0-9]+w(-\\w+)?.jpg`),
Expand Down Expand Up @@ -45,7 +45,7 @@ module('Acceptance | local images', function (hooks) {

assert
.dom('[data-test-local-image="fixed"]')
.hasClass('eri-fixed')
.hasClass('ri-fixed')
.hasAttribute(
'src',
new RegExp(`/images/aurora-640w(-\\w+)?.jpg`),
Expand Down Expand Up @@ -80,8 +80,8 @@ module('Acceptance | local images', function (hooks) {

assert
.dom('[data-test-local-image="fixed,lqip-color"]')
.hasClass('eri-fixed')
// .hasClass('eri-lqip-color')
.hasClass('ri-fixed')
// .hasClass('ri-lqip-color')
.hasAttribute(
'src',
new RegExp(`/images/aurora-640w(-\\w+)?.jpg`),
Expand Down Expand Up @@ -116,9 +116,9 @@ module('Acceptance | local images', function (hooks) {

assert
.dom('[data-test-local-image="fixed,lqip-color"]')
.hasClass('eri-fixed')
// .hasClass('eri-lqip-color')
// .hasClass('eri-dyn-0')
.hasClass('ri-fixed')
// .hasClass('ri-lqip-color')
// .hasClass('ri-dyn-0')
.hasAttribute(
'src',
new RegExp(`/images/aurora-640w(-\\w+)?.jpg`),
Expand Down Expand Up @@ -152,9 +152,9 @@ module('Acceptance | local images', function (hooks) {

assert
.dom('[data-test-local-image="fixed,lqip-inline"]')
.hasClass('eri-fixed')
// .hasClass('eri-lqip-inline')
// .hasClass('eri-dyn-1')
.hasClass('ri-fixed')
// .hasClass('ri-lqip-inline')
// .hasClass('ri-dyn-1')
.hasAttribute(
'src',
new RegExp(`/images/aurora-640w(-\\w+)?.jpg`),
Expand Down Expand Up @@ -188,8 +188,8 @@ module('Acceptance | local images', function (hooks) {

assert
.dom('[data-test-local-image="fixed,lqip-blurhash"]')
// .hasClass('eri-fixed')
// .hasClass('eri-lqip-blurhash')
// .hasClass('ri-fixed')
// .hasClass('ri-lqip-blurhash')
.hasAttribute(
'src',
new RegExp(`/images/aurora-640w(-\\w+)?.jpg`),
Expand Down
2 changes: 1 addition & 1 deletion packages/build-utils/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export function generateLqipClassName(resource: string): string {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return generatedClassNames.get(resource)!;
} else {
const className = `eri-dyn-${b64.encode(generatedClassNames.size)}`;
const className = `ri-dyn-${b64.encode(generatedClassNames.size)}`;
generatedClassNames.set(resource, className);

return className;
Expand Down
12 changes: 6 additions & 6 deletions packages/build-utils/tests/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { generateLqipClassName } from '../src/utils';

describe('generateLqipClassName', () => {
test('it generates unique class names', () => {
expect(generateLqipClassName('foo')).toBe('eri-dyn-0');
expect(generateLqipClassName('bar')).toBe('eri-dyn-1');
expect(generateLqipClassName('baz')).toBe('eri-dyn-2');
expect(generateLqipClassName('foo')).toBe('ri-dyn-0');
expect(generateLqipClassName('bar')).toBe('ri-dyn-1');
expect(generateLqipClassName('baz')).toBe('ri-dyn-2');

expect(generateLqipClassName('foo')).toBe('eri-dyn-0');
expect(generateLqipClassName('bar')).toBe('eri-dyn-1');
expect(generateLqipClassName('baz')).toBe('eri-dyn-2');
expect(generateLqipClassName('foo')).toBe('ri-dyn-0');
expect(generateLqipClassName('bar')).toBe('ri-dyn-1');
expect(generateLqipClassName('baz')).toBe('ri-dyn-2');
});
});
6 changes: 3 additions & 3 deletions packages/ember/src/blurhash.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { decode } from 'blurhash';

const BLURHASH_ATTRIBUTE = 'data-eri-bh';
const WIDTH_ATTRIBUTE = 'data-eri-bh-w';
const HEIGHT_ATTRIBUTE = 'data-eri-bh-h';
const BLURHASH_ATTRIBUTE = 'data-ri-bh';
const WIDTH_ATTRIBUTE = 'data-ri-bh-w';
const HEIGHT_ATTRIBUTE = 'data-ri-bh-h';

const BLURHASH_SCALE_FACTOR = 4;

Expand Down
8 changes: 4 additions & 4 deletions packages/ember/src/components/responsive-image.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
.eri-responsive {
.ri-responsive {
width: 100%;
height: auto;
}

.eri-fixed,
.eri-responsive {
.ri-fixed,
.ri-responsive {
content-visibility: auto;
}

.eri-lqip-inline {
.ri-lqip-inline {
background-size: cover;
}
6 changes: 3 additions & 3 deletions packages/ember/src/components/responsive-image.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
loading='lazy'
decoding='async'
...attributes
data-eri-bh={{this.blurhashMeta.hash}}
data-eri-bh-w={{this.blurhashMeta.width}}
data-eri-bh-h={{this.blurhashMeta.height}}
data-ri-bh={{this.blurhashMeta.hash}}
data-ri-bh-w={{this.blurhashMeta.width}}
data-ri-bh-h={{this.blurhashMeta.height}}
{{style
(if
this.showLqipBlurhash
Expand Down
4 changes: 2 additions & 2 deletions packages/ember/src/components/responsive-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ export default class ResponsiveImageComponent extends Component<ResponsiveImageC
}

get classNames(): string {
const classNames = [`eri-${this.layout}`];
const classNames = [`ri-${this.layout}`];
const lqip = this.args.src.lqip;
if (lqip && !this.isLoaded) {
classNames.push(`eri-lqip-${lqip.type}`);
classNames.push(`ri-lqip-${lqip.type}`);
if (lqip.type === 'color' || lqip.type === 'inline') {
classNames.push(lqip.class);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/vite-plugin/tests/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var g;
const p = [{ url: "/image-100w.jpg", width: 100, format: "jpeg" }, { url: "/image-100w.webp", width: 100, format: "webp" }, { url: "/image-200w.jpg", width: 200, format: "jpeg" }, { url: "/image-200w.webp", width: 200, format: "webp" }], s = {
imageTypes: ["jpeg", "webp"],
availableWidths: [100, 200],
lqip: { type: "color", class: "eri-dyn-0" },
lqip: { type: "color", class: "ri-dyn-0" },
aspectRatio: 1.5,
imageUrlFor(t, n) {
var a;
Expand All @@ -70,7 +70,7 @@ var g;
const p = [{ url: "/image-100w.jpg", width: 100, format: "jpeg" }, { url: "/image-100w.webp", width: 100, format: "webp" }, { url: "/image-200w.jpg", width: 200, format: "jpeg" }, { url: "/image-200w.webp", width: 200, format: "webp" }], s = {
imageTypes: ["jpeg", "webp"],
availableWidths: [100, 200],
lqip: { type: "inline", class: "eri-dyn-0" },
lqip: { type: "inline", class: "ri-dyn-0" },
aspectRatio: 1.5,
imageUrlFor(t, n) {
var a;
Expand Down
4 changes: 2 additions & 2 deletions packages/vite-plugin/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe('LQIP', async () => {

const style = assets.find((a) => a.fileName === 'style.css');
expect(style?.source).toMatchInlineSnapshot(`
".eri-dyn-0{background-color:#083838}
".ri-dyn-0{background-color:#083838}
"
`);
});
Expand All @@ -173,7 +173,7 @@ describe('LQIP', async () => {

const style = assets.find((a) => a.fileName === 'style.css');
expect(style?.source).toMatchInlineSnapshot(`
".eri-dyn-0{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNjQwIDQyNyI+CjxmaWx0ZXIgaWQ9ImIiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+PGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iLjUiPjwvZmVHYXVzc2lhbkJsdXI+PGZlQ29tcG9uZW50VHJhbnNmZXI+PGZlRnVuY0EgdHlwZT0iZGlzY3JldGUiIHRhYmxlVmFsdWVzPSIxIDEiPjwvZmVGdW5jQT48L2ZlQ29tcG9uZW50VHJhbnNmZXI+PC9maWx0ZXI+CjxpbWFnZSBmaWx0ZXI9InVybCgjYikiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIGhlaWdodD0iMTAwJSIgd2lkdGg9IjEwMCUiIHhsaW5rOmhyZWY9ImRhdGE6aW1hZ2UvcG5nO2Jhc2U2NCxpVkJPUncwS0dnb0FBQUFOU1VoRVVnQUFBQWtBQUFBR0NBSUFBQUNlcFNPU0FBQUFDWEJJV1hNQUFBc1RBQUFMRXdFQW1wd1lBQUFBc0VsRVFWUjRuR05nTlRmaDFERGlrdFBoa05WbTB6UmlkWE5pczdaaDFURm0xamRpWVBWMzR2Rnc0ZGUxNWxVeTQ5SzM1QTN6NDNCMzVYRnc0QS96WkdEemMrZkxEaGVKQ3hXMjhCQXdkcFBLU1pDTkRWTlBDeFh5c21mZ01MUGw4M1NVakhkVktReTF5QTVOMlpoclhSWW1iR2ZGcHFMT3dLYW54YVdudzZ1cEx1dGxaSlpwWVpGaEkrWmt3V2xveks2cHpjQWlMODhxTDgydXA4Qm5yeVh2cVduWVlDQVpyTWR0WnNwbWFnSUFBaFFmUDJab1lSQUFBQUFBU1VWT1JLNUNZSUk9Ij48L2ltYWdlPgo8L3N2Zz4=)}
".ri-dyn-0{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNjQwIDQyNyI+CjxmaWx0ZXIgaWQ9ImIiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+PGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iLjUiPjwvZmVHYXVzc2lhbkJsdXI+PGZlQ29tcG9uZW50VHJhbnNmZXI+PGZlRnVuY0EgdHlwZT0iZGlzY3JldGUiIHRhYmxlVmFsdWVzPSIxIDEiPjwvZmVGdW5jQT48L2ZlQ29tcG9uZW50VHJhbnNmZXI+PC9maWx0ZXI+CjxpbWFnZSBmaWx0ZXI9InVybCgjYikiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIGhlaWdodD0iMTAwJSIgd2lkdGg9IjEwMCUiIHhsaW5rOmhyZWY9ImRhdGE6aW1hZ2UvcG5nO2Jhc2U2NCxpVkJPUncwS0dnb0FBQUFOU1VoRVVnQUFBQWtBQUFBR0NBSUFBQUNlcFNPU0FBQUFDWEJJV1hNQUFBc1RBQUFMRXdFQW1wd1lBQUFBc0VsRVFWUjRuR05nTlRmaDFERGlrdFBoa05WbTB6UmlkWE5pczdaaDFURm0xamRpWVBWMzR2Rnc0ZGUxNWxVeTQ5SzM1QTN6NDNCMzVYRnc0QS96WkdEemMrZkxEaGVKQ3hXMjhCQXdkcFBLU1pDTkRWTlBDeFh5c21mZ01MUGw4M1NVakhkVktReTF5QTVOMlpoclhSWW1iR2ZGcHFMT3dLYW54YVdudzZ1cEx1dGxaSlpwWVpGaEkrWmt3V2xveks2cHpjQWlMODhxTDgydXA4Qm5yeVh2cVduWVlDQVpyTWR0WnNwbWFnSUFBaFFmUDJab1lSQUFBQUFBU1VWT1JLNUNZSUk9Ij48L2ltYWdlPgo8L3N2Zz4=)}
"
`);
});
Expand Down
8 changes: 4 additions & 4 deletions packages/webpack/tests/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ export default {

exports[`LQIP > color LQIP is supported 1`] = `
"import { findMatchingImage } from '@responsive-image/core';
import '/fixtures/image.jpg.css!=!@responsive-image/webpack/lqip/color-css!/fixtures/image.jpg?className=eri-dyn-0';
import '/fixtures/image.jpg.css!=!@responsive-image/webpack/lqip/color-css!/fixtures/image.jpg?className=ri-dyn-0';
const images = [{"url":__webpack_public_path__ + "images/image-640w.jpg","width":640,"format":"jpeg"},{"url":__webpack_public_path__ + "images/image-640w.webp","width":640,"format":"webp"},{"url":__webpack_public_path__ + "images/image-750w.jpg","width":750,"format":"jpeg"},{"url":__webpack_public_path__ + "images/image-750w.webp","width":750,"format":"webp"},{"url":__webpack_public_path__ + "images/image-828w.jpg","width":828,"format":"jpeg"},{"url":__webpack_public_path__ + "images/image-828w.webp","width":828,"format":"webp"},{"url":__webpack_public_path__ + "images/image-1080w.jpg","width":1080,"format":"jpeg"},{"url":__webpack_public_path__ + "images/image-1080w.webp","width":1080,"format":"webp"},{"url":__webpack_public_path__ + "images/image-1200w.jpg","width":1200,"format":"jpeg"},{"url":__webpack_public_path__ + "images/image-1200w.webp","width":1200,"format":"webp"},{"url":__webpack_public_path__ + "images/image-1920w.jpg","width":1920,"format":"jpeg"},{"url":__webpack_public_path__ + "images/image-1920w.webp","width":1920,"format":"webp"},{"url":__webpack_public_path__ + "images/image-2048w.jpg","width":2048,"format":"jpeg"},{"url":__webpack_public_path__ + "images/image-2048w.webp","width":2048,"format":"webp"},{"url":__webpack_public_path__ + "images/image-3840w.jpg","width":3840,"format":"jpeg"},{"url":__webpack_public_path__ + "images/image-3840w.webp","width":3840,"format":"webp"}];
export default {
imageTypes: ["jpeg","webp"],
availableWidths: [640,750,828,1080,1200,1920,2048,3840],
lqip: {"type":"color","class":"eri-dyn-0"},
lqip: {"type":"color","class":"ri-dyn-0"},
aspectRatio: 1.5,
imageUrlFor(w, f) {
return findMatchingImage(images, w, f ?? "jpeg")?.url;
Expand All @@ -31,12 +31,12 @@ export default {

exports[`LQIP > inline LQIP is supported 1`] = `
"import { findMatchingImage } from '@responsive-image/core';
import '/fixtures/image.jpg.css!=!@responsive-image/webpack/lqip/inline-css!/fixtures/image.jpg?className=eri-dyn-0&targetPixels=60';
import '/fixtures/image.jpg.css!=!@responsive-image/webpack/lqip/inline-css!/fixtures/image.jpg?className=ri-dyn-0&targetPixels=60';
const images = [{"url":__webpack_public_path__ + "images/image-640w.jpg","width":640,"format":"jpeg"},{"url":__webpack_public_path__ + "images/image-640w.webp","width":640,"format":"webp"},{"url":__webpack_public_path__ + "images/image-750w.jpg","width":750,"format":"jpeg"},{"url":__webpack_public_path__ + "images/image-750w.webp","width":750,"format":"webp"},{"url":__webpack_public_path__ + "images/image-828w.jpg","width":828,"format":"jpeg"},{"url":__webpack_public_path__ + "images/image-828w.webp","width":828,"format":"webp"},{"url":__webpack_public_path__ + "images/image-1080w.jpg","width":1080,"format":"jpeg"},{"url":__webpack_public_path__ + "images/image-1080w.webp","width":1080,"format":"webp"},{"url":__webpack_public_path__ + "images/image-1200w.jpg","width":1200,"format":"jpeg"},{"url":__webpack_public_path__ + "images/image-1200w.webp","width":1200,"format":"webp"},{"url":__webpack_public_path__ + "images/image-1920w.jpg","width":1920,"format":"jpeg"},{"url":__webpack_public_path__ + "images/image-1920w.webp","width":1920,"format":"webp"},{"url":__webpack_public_path__ + "images/image-2048w.jpg","width":2048,"format":"jpeg"},{"url":__webpack_public_path__ + "images/image-2048w.webp","width":2048,"format":"webp"},{"url":__webpack_public_path__ + "images/image-3840w.jpg","width":3840,"format":"jpeg"},{"url":__webpack_public_path__ + "images/image-3840w.webp","width":3840,"format":"webp"}];
export default {
imageTypes: ["jpeg","webp"],
availableWidths: [640,750,828,1080,1200,1920,2048,3840],
lqip: {"type":"inline","class":"eri-dyn-0"},
lqip: {"type":"inline","class":"ri-dyn-0"},
aspectRatio: 1.5,
imageUrlFor(w, f) {
return findMatchingImage(images, w, f ?? "jpeg")?.url;
Expand Down