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

Add proper image processing (resizing/optimisation) into Astro build process #58

Closed
andygrunwald opened this issue Jun 20, 2022 · 8 comments
Labels
blocked enhancement New feature or request

Comments

@andygrunwald
Copy link
Contributor

andygrunwald commented Jun 20, 2022

Most of the pictures are either not optimized or simple way too big.

It would make sense to add an additional step into the build process to optimize the pictures.

Resources:

@andygrunwald andygrunwald added the enhancement New feature or request label Jun 20, 2022
@andygrunwald andygrunwald added this to the Iteration cycle #3 milestone Jun 20, 2022
@andygrunwald
Copy link
Contributor Author

Astro itself launched an Image component. See https://github.com/withastro/astro/tree/main/packages/integrations/image
Still experimental.

We will wait until Astro is either 1.0.0 stable or this component have been moved out of the experimental status.

Until then: This ticket is on-hold

@dkotik
Copy link

dkotik commented Jul 26, 2022

I ran into this. The experience is not fun. *.mdx integration handles the optimized assets correctly without any kind of special component. But, you cannot glob *.mdx the same way - the .file property is empty, breaking all my *.md globs.

I tried the experimental component and it did not work. If this already works for *.mdx, why not port the changes to regular Markdown?

@EraYaN
Copy link

EraYaN commented Dec 20, 2022

And it also does not support something for scss or sass so we can use image-set for background and stuff. That would also be very useful.

@Oudwins
Copy link

Oudwins commented Apr 15, 2023

It would be ideal to have support for this resizing/optimization to also happen for images imported into react/vue/etc components at least as long as the component itself is static.

@andygrunwald
Copy link
Contributor Author

FYI:

@astrojs/image 📷
⚠️ This integration will be deprecated in Astro v3.0 (Fall 2023) in favor of the astro:assets module. Please see the Assets documentation for more information.

We will wait until Astro v3 is out and then directly use the new asset module.

@andygrunwald
Copy link
Contributor Author

@andygrunwald
Copy link
Contributor Author

Primarily done.
A few other sections will be handled in their own tickets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants