[Enhancement] Cover image downsizing when adding a new book #118

Closed
opened 2026-04-24 22:58:55 +02:00 by adam · 5 comments
Owner

Originally created by @scorpio862 on GitHub (Dec 7, 2021).

At the moment, Audiobookshelf is using the covers in original size. This could potentially slow down the page load times as some of the covers can be in high resolution.

There needs to be a process which will downsize the cover.jpeg files in metadata folder to 208x332px (or whatever is the highest image size used by audiobookshelf). There is no need (at least at the moment) to have the covers in high resolution.

I noticed that some of my covers in the medatadata folder are more than 2MB. I have 425 audiobooks and all the covers in total have around 19MB and this is a lot of loading.

Originally created by @scorpio862 on GitHub (Dec 7, 2021). At the moment, Audiobookshelf is using the covers in original size. This could potentially slow down the page load times as some of the covers can be in high resolution. There needs to be a process which will downsize the cover.jpeg files in metadata folder to 208x332px (or whatever is the highest image size used by audiobookshelf). There is no need (at least at the moment) to have the covers in high resolution. I noticed that some of my covers in the medatadata folder are more than 2MB. I have 425 audiobooks and all the covers in total have around 19MB and this is a lot of loading.
adam added the enhancement label 2026-04-24 22:58:55 +02:00
adam closed this issue 2026-04-24 22:58:55 +02:00
Author
Owner

@advplyr commented on GitHub (Dec 7, 2021):

Yeah this is a big one for performance. When I was working on the lazy bookshelf I also noticed that the cover image load times could be improved.
There will be some logic to change when it comes to saving cover image paths. All cover paths will point to the metadata directory, instead of the audiobook directory if you have that server setting enabled.

I am also a fan of low quality image placeholders. This would mean potentially generating 2 images per cover. One of them being very small like 25px width that is used until the other image loads. Might not be necessary in this case, but if you have used Google photos they do this and have one of the best user experiences in that regard.

@advplyr commented on GitHub (Dec 7, 2021): Yeah this is a big one for performance. When I was working on the lazy bookshelf I also noticed that the cover image load times could be improved. There will be some logic to change when it comes to saving cover image paths. All cover paths will point to the metadata directory, instead of the audiobook directory if you have that server setting enabled. I am also a fan of [low quality image placeholders](https://www.guypo.com/introducing-lqip-low-quality-image-placeholders). This would mean potentially generating 2 images per cover. One of them being very small like 25px width that is used until the other image loads. Might not be necessary in this case, but if you have used Google photos they do this and have one of the best user experiences in that regard.
Author
Owner

@Jdiesel87 commented on GitHub (Dec 8, 2021):

Agreed it is amazing how small of a file size you can get away with when the image is in the proper format, using the right compression and scaled correctly for the viewing screen.

Do the clients store cached images locally at the moment?

@Jdiesel87 commented on GitHub (Dec 8, 2021): Agreed it is amazing how small of a file size you can get away with when the image is in the proper format, using the right compression and scaled correctly for the viewing screen. Do the clients store cached images locally at the moment?
Author
Owner

@advplyr commented on GitHub (Dec 13, 2021):

v1.6.40 was just pushed that downsizes covers and uses webp if accepted. Covers are cached on the server in /metadata/cache/covers. Cache can be purged with a button on the config page.

@advplyr commented on GitHub (Dec 13, 2021): `v1.6.40` was just pushed that downsizes covers and uses webp if accepted. Covers are cached on the server in `/metadata/cache/covers`. Cache can be purged with a button on the config page.
Author
Owner

@scorpio862 commented on GitHub (Dec 13, 2021):

This is grat. The page loads much faster. The total size of cover images was cut by half. Some cover are showing now as "Invalid Covers" for some reason but it is not a huge problem. I just had to find new images on google.

Is is possible to get the android app to store the covers localy on the phone?

@scorpio862 commented on GitHub (Dec 13, 2021): This is grat. The page loads much faster. The total size of cover images was cut by half. Some cover are showing now as "Invalid Covers" for some reason but it is not a huge problem. I just had to find new images on google. Is is possible to get the android app to store the covers localy on the phone?
Author
Owner

@advplyr commented on GitHub (Dec 17, 2021):

There were some issues with the covers that were resolved in the last update.
Yes, I think the mobile app will eventually cache cover images but not a priority atm.

@advplyr commented on GitHub (Dec 17, 2021): There were some issues with the covers that were resolved in the last update. Yes, I think the mobile app will eventually cache cover images but not a priority atm.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#118