You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you very much for this promising plugin. Unfortunately I have a hard time getting it to run, maybe someone can help me? I just started with a fresh Rollup + Sapper template and only installed Netlify CMS.
My Rollup config (reduced to only svelte-image related stuff):
<script>importImagefrom"svelte-image";letimage='/uploads/my-image.jpg';</script><!-- using component --><Imagesrc={image}alt="Image by url" /><!-- using html string -->
{@html `<imgsrc="${image}" alt="Image inside html" />`}
...results in:
<!-- using component --><divclass="wrapper svelte-142y8oi" style="min-height: 100px; width: 100%;"><divclass="svelte-ilz1a1 loaded" style="position: relative; width: 100%;"><divstyle="position: relative; overflow: hidden;"><divstyle="width: 100%; padding-bottom: 100%;"></div><imgclass="placeholder svelte-ilz1a1 blur" src="/uploads/my-image.jpg" alt="Image by url"><picture><sourcetype="image/webp" srcset="" sizes="(max-width: 1000px) 100vw, 1000px"><sourcesrcset="" sizes="(max-width: 1000px) 100vw, 1000px"><imgsrc="/uploads/my-image.jpg" class="main svelte-ilz1a1" alt="Image by url"></picture></div></div></div><!-- using html string --><imgsrc="/uploads/my-image.jpg" alt="Image inside html">
The image is being reduced to the desired sizes and appear in the static folder, like static/g/uploads/my-image.400.jpg.
Also both images show up in the browser, but only the original file, not the reduced thumbs.
While the component creates that huge block of markup without the srcset and with the wrong height, the image that comes from a string of html is not processed at all.
What am I missing? Thanks for any help!
The text was updated successfully, but these errors were encountered:
moritzebeling
changed the title
Generated images, correct height missing
[Need help]: Images are processed but not outputted
May 16, 2021
Ever figure out the issue?
I'm running into same issue, using sveltekit, when I manually put in image source it works, but using any sort of variables for the image source causes the output to mess up
Thank you very much for this promising plugin. Unfortunately I have a hard time getting it to run, maybe someone can help me? I just started with a fresh Rollup + Sapper template and only installed Netlify CMS.
My Rollup config (reduced to only svelte-image related stuff):
My svelte component...
...results in:
The image is being reduced to the desired sizes and appear in the static folder, like
static/g/uploads/my-image.400.jpg
.Also both images show up in the browser, but only the original file, not the reduced thumbs.
While the component creates that huge block of markup without the srcset and with the wrong height, the image that comes from a string of html is not processed at all.
What am I missing? Thanks for any help!
The text was updated successfully, but these errors were encountered: