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

Asset strategy #20

Open
jonaskuske opened this issue Aug 9, 2022 · 1 comment
Open

Asset strategy #20

jonaskuske opened this issue Aug 9, 2022 · 1 comment

Comments

@jonaskuske
Copy link
Collaborator

Currently all assets imported in the frontend portion are included in the JS/CSS files as data URLs. This means that importing a single image can blow up the size of the JS to be parsed and executed to multiple MBs!

Would be great to somehow skip inlining the assets, but it doesn't appear that easy to solve, as the problematic behavior is built into Vite and not configurable:

Optimal would be some integrations so assets are loaded from the plugin's assets/ folder which Kirby automagically copies to the /media directory: https://getkirby.com/docs/guide/plugins/plugin-basics#plugin-assets

@johannschopplich
Copy link
Owner

johannschopplich commented Aug 30, 2022

Kirby actually copies assets from a plugin's assets folder to the media folder already.

As it says in your opening post. Pardon me. 😅

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