You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’d like to report a minor bug. When I import images using only the ?raw or ?url queries, the plugin processes them when it shouldn’t. As a result, the asset build generates images in .png format instead of preserving the original file format. It seems that if the format is not specified, the plugin defaults to converting images to .png.
According to the Vite documentation on Static Asset Handling I can import an image using these arguments to determine whether to receive the asset's URL or a string containing the image content, which is particularly useful for .svg files.
This issue can be easily circumvented with the following configuration:
However, I think it is appropriate to apply a FIX directly in the plugin code, since the ?url and ?raw queries are vite-specific features and should be handled automatically by the plugin.
Thank you.
The text was updated successfully, but these errors were encountered:
I’d like to report a minor bug. When I import images using only the
?raw
or?url
queries, the plugin processes them when it shouldn’t. As a result, the asset build generates images in.png
format instead of preserving the original file format. It seems that if the format is not specified, the plugin defaults to converting images to.png
.According to the Vite documentation on Static Asset Handling I can import an image using these arguments to determine whether to receive the asset's URL or a string containing the image content, which is particularly useful for
.svg
files.This issue can be easily circumvented with the following configuration:
However, I think it is appropriate to apply a FIX directly in the plugin code, since the
?url
and?raw
queries are vite-specific features and should be handled automatically by the plugin.Thank you.
The text was updated successfully, but these errors were encountered: