chore: move early return

This commit is contained in:
Cory Dransfeldt 2023-10-21 13:30:18 -07:00
parent 1bec07756c
commit cb49bb0ab5

View file

@ -140,6 +140,7 @@ module.exports = function (eleventyConfig) {
// image shortcode
eleventyConfig.addShortcode('image', async function (src, alt, css, sizes, loading) {
if (!src) return
let metadata = await Image(src, {
widths: [75, 150, 300, 600],
formats: ['webp'],
@ -147,8 +148,6 @@ module.exports = function (eleventyConfig) {
outputDir: './_site/assets/img/cache/',
})
if (!src) return
let imageAttributes = {
class: css,
alt,