saicaca / fuwari

✨A static blog template built with Astro.
https://fuwari.vercel.app
MIT License
1.41k stars 326 forks source link

How can i change image sizes? #190

Closed SickHacks closed 3 weeks ago

SickHacks commented 2 months ago

Hello, I really like this template. I have set up and configured my page, but I still can't modify the size of the images I upload to my posts. I've tried several ways, but haven't been successful. How do you usually handle this? Thanks in advance. 🌿

L4Ph commented 1 month ago

What does resizing an image entail? px?, aspect ratio?

SickHacks commented 1 month ago

Oh sorry, by image size i mean px, widht lenght.

L4Ph commented 1 month ago

@SickHacks The markdown syntax ![image](expample.jpg) does not allow specifying image height or width. To do so, you must use the <img src="example.jpg" alt="" width="" height="" />. however, it's possible that Fuwari is overriding those values.

saicaca commented 1 month ago

<img width="" /> works, but it can only be used for images in the /public and remote images.

For local images, you might need to use the <Image> components, in MDX files. You will need to add MDX integration manually as it is not included by default.

https://docs.astro.build/en/guides/images/#images-in-mdx-files https://docs.astro.build/en/guides/integrations-guide/mdx