gethugothemes / bookworm-light-hugo

Bookworm is a clean and modern Hugo blog theme focused on high speed and support multiple authors.
https://gethugothemes.com/products/bookworm/?utm_source=bookworm_github&utm_medium=referral&utm_campaign=github_theme_about
MIT License
100 stars 74 forks source link

Poor image quality after image resize & format change #34

Closed gomarcd closed 1 year ago

gomarcd commented 1 year ago

Hello,

Thank you for creating this theme and making it available.

Trying it out, I ran into a snag with image quality where there appears to be some image processing/resizing going on that converts images into a different format, introducing some unfortunate quality degradation that becomes most apparent as jagged edges along previously smooth round surfaces.

I found the Image Processing section included in the exampleSite config.toml that had quality = "95" by default, but toggling this to 100 or commenting it out didn't seem to have any noticeable effect.

Is there an option that can be added so as to not convert the image format?

tfsomrat commented 1 year ago

Hello @gomarcd

Thanks for choosing our theme. here is the complete documentation about the image partial https://github.com/gethugothemes/hugo-modules/tree/master/images#image-implementation

you can play with it if needed. thanks

gomarcd commented 1 year ago

Thank you for taking the time @tfsomrat, that was helpful. With that, I was able to find out converting to webp format did not really turn out to be my issue.

After some more digging, I found this thread, one of several out there on quality degradation after Hugo image processing.

In my case, adding resampleFilter = "lanczos" to the config.toml resolved the issue. I hope this will help someone else that may stumble upon the same hiccup.

Thank you for the quick and good help, much appreciated.