-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next - Images don't generate #34
Comments
That's weird, I kinda expected this a bit to be honest since I changed the way images get generated in devmode completely (streaming the image to the browser instead of copying around a ton of files). I didn't change the way images get generated in build mode at all so that's kinda weird. I'll have a look a your repo and try to troubleshoot it! |
I'll probably won't be able to get back to this before tomorrow or friday, I'm kinda busy right now, but don't worry we'll get that fixed 👍🏻 |
Yes I'll definitely create a PR once the lib works 😂
No problem. I like your spirit! |
Alright, I've been experimenting a bit: |
I'm so stupid duh... You know what the issue was? 😆 Images IDs were basically the url params hashed, since the same configuration always produces the same image, but it was only the url params and so the image path was not taken into account. How stupid... Anyway, the fixed version should be available from npm soon!
And regarding your second issue with images not been generated in build mode, it seems like Vite is not picking up the import at all and that's why the images weren't included in the build. I don't know how or why it is different in build mode, but Vite-imagetools has nothing to do with that. It never gets told about any images in the first place. |
This resolves #34, by including the images path when generating the internal image ID.
Yeah that makes sense why it was loading the last imported image.
I see, so I'm gonna create an issue over in the Vite repo. Thanks for debugging man! |
Hey so I've tried the next branch today and whilst I was trying to find the easiest and least painful way of importing a directory full of images in different sizes and formats.
There are 2 issues:
build
doesn't generate any images at alldev
generates only the last imported image and uses it as src in all other images (but other data such as width or height are correct)Here is the repo with the issue: https://github.com/YamiteruXYZ/imagetools-workbench
BTW I'm gonna use this repo to experiment with imagetools and it might be a source of some demos or starters.
The text was updated successfully, but these errors were encountered: