Closed gdbaldw closed 3 years ago
where is the image located? and which code usees it how?
Where? In a sub-sub-folder under /docs
/docs/A/B/images/C.jpg copies into _site_dev/A/B/images/C.jpg
But, /docs/A/B/images/C.jpeg does not copy.
Which code? $ yarn start Copy occurs for jpg, does not for jpeg
$ yarn build Fails with Error when rollup cannot find the .jpeg file in _site_dev
I meant more like how is it used in the html 😅
in most cases, Rocket does not need any copying of images/assets as it auto-detects assets within html and js.
e.g.
<img src="../foo.jpeg" alt="foo" />
or
const imgUrl = new URL('../bar.jpeg', import.meta.url).href;
const img = document.createElement('img');
img.src = imgUrl;
will not require any copying 💪
Therefore I'm wondering how you use it which would require copying 🤔
Oh! My two test cases are front matter in YAML format, and as a Markdown link:
'---' cover_image: /A/B/images/C.jpg '---'
[image](/A/B/images/C.jpg)
I thought about this the wrong way... I thought the problem was with rollup but it's probably with 11ty...
can you try adding .jpeg
to this copy command
https://github.com/daKmoR/rocket/blob/master/packages/cli/src/shared/.eleventy.cjs#L48
Yes, that's it!
can you try adding .jpeg to this copy command https://github.com/daKmoR/rocket/blob/master/packages/cli/src/shared/.eleventy.cjs#L48
Build fails to copy .jpeg assets.
To recreate failure, rename a .jpg asset to .jpeg, then build.