question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`vite-imagetools cannot find image with id "<id>"`

See original GitHub issue

What I did:

<template lang="pug">

div.flex.flex-row.overflow-hidden(data-testid="rogues-gallery")
  img(v-for="i in Array(3).fill('')" :src="`${moreImage}`").more-image.w-40.m-3.inline

</template>

<script lang="ts">
// @ts-expect-error
import image from '../img/export/man.png?h=250;500'

export default {
  computed: {
    moreImage: () => image,
  },
}
</script>

What I Wanted:

2 images, one 250px wide and the other 500px.

What I Got:

vite-imagetools cannot find image with id "99e660ff1a09e8cfe50c4085fd715e2f41d69980," this is likely an internal error is printed to the console (and also to the error overlay on the dev server).

any ideas?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
HassanZahirniacommented, Sep 18, 2022

vite-imagetools generates a bunch of images, as this is an expensive operation it also caches those images by hash. If you do HMR (or some other funky stuff) this can happen as the rendered page and the cache get out of sync. Is this happening reproducibly? And if so can you provide a repro please?

I have the same issue and I’m using HMR (which obviously is a common thing for development these days). Is there any way around this ? This tool is really fascinating and I would like to use the multi format feature, but this error would prevent using it while developing.

0reactions
k4y4kcommented, Oct 16, 2021

I ended up just going back to Gatsby 😕.

If I come back to Vite and this plugin again in the future, I’ll reopen this issue, but for now, I’ll close it.

Thank you anyway for your time 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

vite-imagetools - npm
A toolbox of import directives for vitejs that can transform your image at compile-time. All of the image transformations are powered by sharp....
Read more >
Using vite-imagetools with SvelteKit : r/sveltejs - Reddit
I tried putting it onto the default export object but that doesn't work (and pkg is undefined, which makes sense, because it is)....
Read more >
Vite cannot find images on build - Laracasts
Vite cannot find images on build. Hello, I currently have a Laravel application with Vite, and I have been developing this with Vue....
Read more >
Vite Imagetools: Load and Transform Images using Url Query ...
In this library, learn about Vite Imagetools: Load and Transform Images ... uniqueId: You must set a unique string identifier so that EasyMDE...
Read more >
Vue integration | Docs - TinyMCE
Version 4 of the tinymce-vue package supports Vue.js 3.x, but does not support Vue.js 2.x. ... <template> <div id="app"> <img alt="Vue logo" src="....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found