HiDeoo / starlight-blog

Starlight plugin to add a blog to your documentation
https://starlight-blog-docs.vercel.app
MIT License
106 stars 10 forks source link

Author's picture isn't optimised #52

Closed ematipico closed 1 week ago

ematipico commented 1 week ago

Describe the bug

The dev toolbar complains about the images not being optimized

Screenshot 2024-06-15 at 14 19 01

To Reproduce

Define an author with a remote URL:

                    ema: {
                        "name": "Emanuele Stoppa",
                        "picture": "https://avatars.githubusercontent.com/u/602478?v=4",
                        "url": "https://twitter.com/ematipico"
                    }

Expected behavior

I expect no warnings from the dev toolbar

How often does this bug happen?

Every time

System Info

No response

Additional Context

No response

HiDeoo commented 1 week ago

Thanks for the report, super appreciated. I totally missed this one and I was using an Astro version not reporting this error.

This will be fixed in the next version of the plugin but I want to push a few more changes before releasing it.

Note that on some pages (blog posts and tags listing), another error (perf-use-loading-lazy) may appear based on the number/length of posts, height of the window, etc.

I cannot reliably handle this error as it's based on various factors so I'll probably ask Erika/open an issue about it as I don't think the rule in its current form can handle this case.