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

Inline remote files #31

Open
stefnotch opened this issue Jan 29, 2023 · 3 comments
Open

Inline remote files #31

stefnotch opened this issue Jan 29, 2023 · 3 comments

Comments

@stefnotch
Copy link

I've been searching for a PostCSS plugin that can optionally inline remote files, such as woff and woff2 fonts, images and svgs.

This one already inlines styles. Would it be possible to extend it to handle other file types?

@stefnotch
Copy link
Author

(The other plugin postcss/postcss-url#133 doesn't seem to work, hence the question here)

@unlight
Copy link
Owner

unlight commented Feb 4, 2023

This plugin focus to handle @import url ... expession

What plugin did you check?
Its seems there is a plenty to choose from search results:
https://github.com/search?q=postcss+inline
https://github.com/search?q=postcss+base64

@stefnotch
Copy link
Author

I just went through every single plugin. Nearly all of them just inline local files, as in, they'll do fs.read...()

There are only three of them that read remote images:
https://github.com/lagden/postcss-inline-base64 unusable due to requiring specially formatted strings
https://github.com/moshen/postcss-remote-font-inliner for fonts
https://github.com/bezoerb/postcss-image-inliner for images

I'll try out those two plugins and hope that they work well enough, I suppose.

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