Skip to content

Banner img has original width and heigth set. Lowers Speed Result on Mobile #189

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

Open
keesfluitman opened this issue Apr 15, 2025 · 1 comment

Comments

@keesfluitman
Copy link

keesfluitman commented Apr 15, 2025

Im an Amateur hobbyist. Enjoying your great work to play around. Thank you very much!

I couldnt figure out why this is generated in my html

<img loading="eager" decoding="async" src="/images/logo/logo_weiss_hu5727949254694983326.png" class=" mx-auto lg:!max-w-[800px] img" alt="Banner image" width="1884" height="1738">

It is slowing down rendering. Probably because of the width and height that have the original image size set?
What partial is actually used here?
{{ partial "image" (dict "Src" .image "Alt" "Banner image" "Loading" "eager" "Class" "mx-auto lg:!max-w-[800px]" "DisplayXL" "800x" ) }}

I dont see a partial image.html in the theme's dir. Nor can I find anything about a default internal image partial?

Help would be much appreciated.

@tfsomrat
Copy link
Contributor

Hey @keesfluitman, we have used this module: https://github.com/gethugothemes/hugo-modules/tree/master/images#image-implementation

you can see the docs here also, you can set your desired size for mobile by following the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants