Skip to content
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

vite-imagetools doesn't pick up my images on build (SvelteKit + MDsveX) #398

Closed
wentallout opened this issue Sep 22, 2022 · 4 comments
Closed

Comments

@wentallout
Copy link

I was using MDsveX to render a blog page but the images I import into it don't work when transformed into webp using imagetools.

My code on the markdown page

import thumbnail from '$lib/assets/images/project/reza/reza-thumbnail.png?webp';

This is how it looks on dev

photo_2022-09-20_11-58-00

This is the same page on preview

photo_2022-09-20_12-08-29

@wentallout wentallout changed the title vite-imagetools doesn't pick up my images on build (MDsveX) vite-imagetools doesn't pick up my images on build (SvelteKit + MDsveX) Sep 22, 2022
@AlexDaichendt
Copy link

AlexDaichendt commented Sep 24, 2022

Problem is - as far as I can tell - related to the path of the image in production. If the current page is two folders deep, ./_app will incorrectely try to fetch the image from root.com/path/_app instead of root.com/_app.

Edit: looks like this can be closed, unrelated to this project. #367

@benmccann
Copy link
Collaborator

Can you check if #400 would fix the issue you're facing?

@wentallout
Copy link
Author

Can you check if #400 would fix the issue you're facing?

hey, Is the fix still being worked on? My project is stuck because my images route is still wrong on build. Can you let me know if that pull request is approved?

@benmccann
Copy link
Collaborator

#400 was merged in #412 and released in 4.0.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants