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

Allow external image src #37

Closed
refact0r opened this issue Jul 19, 2023 · 3 comments
Closed

Allow external image src #37

refact0r opened this issue Jul 19, 2023 · 3 comments
Assignees

Comments

@refact0r
Copy link

I have set the media_folder setting to a folder within the /src folder of my Sveltekit site, as I want to use vite-imagetools to transform and optimize all images. This means that the images would not be available through a direct path like they would in /static, and so their thumbnails don't show up in Sveltia's image library. Thus I would like to see external image urls being allowed for the public_folder setting. Maybe it would be even better to have a separate option for the path of Sveltia's image thumbnails vs the path written into the markdown files.

@kyoshino
Copy link
Member

Hey, thanks for filing the issue! Yeah, I know there are some cases image previews don’t work. The site mentioned in #6 has the same issue with vite-imagetools. I’ll figure out how to work around it soonish.

@refact0r
Copy link
Author

It seems like having images in /static and importing from there works somehow, but Sveltekit really doesn't like it and gives constant console warnings.

@kyoshino
Copy link
Member

kyoshino commented Aug 18, 2023

I have fixed the issue indirectly in 6ba93d6 now shipped as v0.5.3. Just like Netlify CMS, the preview files will now be loaded from GitHub through the API, not from the production site, so the paths are no longer an issue.

@kyoshino kyoshino self-assigned this Sep 2, 2023
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

2 participants