onwidget / astrowind

⭕️ AstroWind: A free template using Astro 4.0 and Tailwind CSS. Astro starter theme.
https://astrowind.vercel.app
MIT License
3.33k stars 1.01k forks source link

Astrowind optimizes images in /public #473

Closed Harold-Anderson closed 3 months ago

Harold-Anderson commented 4 months ago

Astrowind does not seem to read images from /public, or if it does, optimizes them. Thus, there is no way to specify a jpeg image for a blog post that can be used on LinkedIn, which only accepts jpeg images.

Harold-Anderson commented 4 months ago

There is a workaround for LinkedIn. When posting a blog article, it is possible to remove the webp image and add a jpeg image manually during the posting process. So I'm going ahead and using Astrowind as is.

prototypa commented 3 months ago

Hi @Harold-Anderson

You are right. Thanks. There was a bug where images within /public were being optimized

It was already resolved with: https://github.com/onwidget/astrowind/commit/b2632ee3b11a2d1e1ed2151ffbdaa0eba23f793c

AstroWind certainly has some features that were necessary at a time when Astro did not have them. That is why it has been so well received, but Astro has already evolved and there are certain parts that we must update. In the AstroWind 2 version we are taking into account being 100% level with everything new from Astro and being fully compatible with the new.

prototypa commented 3 months ago

Regarding the optimization to jpg (due to the Linkedin problem, we are thinking about it), there is a setting within the file dedicated to image optimization (we should export it as a public setting) that allows us to define the formats to which the images will be optimized. images, in your case it could be useful:

https://github.com/onwidget/astrowind/blob/main/src/utils/images-optimization.ts#L58