1
0
Fork 0
mirror of https://github.com/TheThomaas/my-online-cookbook.git synced 2026-01-10 20:01:47 +00:00

Allow hotlinking recipe images

This commit is contained in:
maeligg 2021-06-09 11:10:02 +02:00
parent a1702b3ac7
commit 3ddf9a6590

View file

@ -68,7 +68,7 @@ module.exports = config => {
/* Shortcodes */
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],
formats: ['webp', 'jpeg'],
outputDir: './_site/img/recipes',