Allow hotlinking recipe images
This commit is contained in:
parent
a1702b3ac7
commit
3ddf9a6590
|
|
@ -68,7 +68,7 @@ module.exports = config => {
|
||||||
|
|
||||||
/* Shortcodes */
|
/* Shortcodes */
|
||||||
const imageShortcode = async (src, className, alt, sizes) => {
|
const imageShortcode = async (src, className, alt, sizes) => {
|
||||||
let metadata = await Image(`./src/${src}`, {
|
let metadata = await Image(src.includes('http') ? src : `./src/${src}`, {
|
||||||
widths: [600, 1500, 3000],
|
widths: [600, 1500, 3000],
|
||||||
formats: ['webp', 'jpeg'],
|
formats: ['webp', 'jpeg'],
|
||||||
outputDir: './_site/img/recipes',
|
outputDir: './_site/img/recipes',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue