Skip to content

Commit 432eecb

Browse files
committed
Close picture element
1 parent 9f7f4aa commit 432eecb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

_includes/shortcodes/responsive-image.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ module.exports = async (src, alt, outputFormat = 'jpeg') => {
1818
const sourceBlock = Object.values(stats).map((imageFormat) => `<source type="image/${imageFormat[0].format}" srcset="${imageFormat.map((entry) => `${entry.url} ${entry.width}w`).join(', ')}" sizes="${sizes}">`).join('\n');
1919

2020
return `<picture class="image">
21-
${sourceBlock}
22-
<img src="${lowestSrc.url}" width="${lowestSrc.width}" height="${lowestSrc.height}" alt="${alt}" loading="lazy">`;
21+
${sourceBlock}
22+
<img src="${lowestSrc.url}" width="${lowestSrc.width}" height="${lowestSrc.height}" alt="${alt}" loading="lazy">
23+
</picture>`;
2324
} catch (err) {
2425
// eslint-disable-next-line no-console
2526
console.error('Responsive Image: eleventy-img error:', err);

0 commit comments

Comments
 (0)