Auto Scale/Resize Cover art #2870

Closed
opened 2026-02-05 05:32:34 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @uprightcarrion on GitHub (Jun 24, 2022).

Describe the feature you'd like

When uploading an image it would be nice if it was automatically scaled appropriately for the display. You can see below this is a 48x48 image, this could be scaled down so the entire image is visible.
image

Describe the benefits this would bring to existing BookStack users

This feature will help with visual aesthetics. Editors of the site may not always use appropriately sized images, which then don't render nicely.

Can the goal of this request already be achieved via other means?

There may be solutions through CSS, I'm not sure. The current solution is to use an appropriate image, 24x24 I think?

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundemental request

How long have you been using BookStack?

0 to 6 months

Additional context

No response

Originally created by @uprightcarrion on GitHub (Jun 24, 2022). ### Describe the feature you'd like When uploading an image it would be nice if it was automatically scaled appropriately for the display. You can see below this is a 48x48 image, this could be scaled down so the entire image is visible. ![image](https://user-images.githubusercontent.com/7152455/175554836-9af1b159-f157-4f93-b7b4-9dd1bf02d608.png) ### Describe the benefits this would bring to existing BookStack users This feature will help with visual aesthetics. Editors of the site may not always use appropriately sized images, which then don't render nicely. ### Can the goal of this request already be achieved via other means? There may be solutions through CSS, I'm not sure. The current solution is to use an appropriate image, 24x24 I think? ### Have you searched for an existing open/closed issue? - [X] I have searched for existing issues and none cover my fundemental request ### How long have you been using BookStack? 0 to 6 months ### Additional context _No response_
OVERLORD added the 🔨 Feature Request label 2026-02-05 05:32:34 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jun 24, 2022):

Hi @uprightcarrion,

Images by default are set to cover the area of the image display area, while maintaining aspect ratio.
There's no set image size for these areas since the display size may change depending on display screen size.
If you instead wanted images to be scaled to fit within the box, you could use the following CSS:

<style>
.entity-list-item-image {
    background-size: cover;
    background-repeat: no-repeat;
}
</style>

Though, with this approach, you may get horizontal or vertical bars from the background area.
Alternatively you could use the following to stretch the image:

<style>
.entity-list-item-image {
    background-size: 100% 100%;
    background-repeat: no-repeat;
}
</style>
@ssddanbrown commented on GitHub (Jun 24, 2022): Hi @uprightcarrion, Images by default are set to cover the area of the image display area, while maintaining aspect ratio. There's no set image size for these areas since the display size may change depending on display screen size. If you instead wanted images to be scaled to fit within the box, you could use the following CSS: ```html <style> .entity-list-item-image { background-size: cover; background-repeat: no-repeat; } </style> ``` Though, with this approach, you may get horizontal or vertical bars from the background area. Alternatively you could use the following to stretch the image: ```html <style> .entity-list-item-image { background-size: 100% 100%; background-repeat: no-repeat; } </style> ```
Author
Owner

@uprightcarrion commented on GitHub (Jun 25, 2022):

@ssddanbrown Thanks, I understand. I'll look at implementing your suggestions. Great project!

@uprightcarrion commented on GitHub (Jun 25, 2022): @ssddanbrown Thanks, I understand. I'll look at implementing your suggestions. Great project!
Author
Owner

@ssddanbrown commented on GitHub (Jul 26, 2022):

Since a workaround was provided I'll close this off.

@ssddanbrown commented on GitHub (Jul 26, 2022): Since a workaround was provided I'll close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2870