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:
parent
a1702b3ac7
commit
3ddf9a6590
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in a new issue