humhub / linkpreview-issues

Issue Tracker for LinkPreview module
2 stars 1 forks source link

Preview Image size #37

Closed Mimanolis closed 3 months ago

Mimanolis commented 1 year ago

Is there a way to enlarge the image in the preview, is it module-based or humhub core-based of how the previews are displayed?

samuk commented 3 months ago

increasesize

+1 @marc-farre is this one we can fix? cc @luke-

marc-farre commented 3 months ago

The saved image is large. It's only a rendering issue.

Currently images are fixed to 80px width:

image

If we change to 200px it renders this way:

image

I think we should define the width via CSS to handle the many situations (small screen size and portrait format).

@luke- Would you like me to try a PR with CSS instead of this fixed 80px width?

luke- commented 3 months ago

@marc-farre Yes please. Thanks!

marc-farre commented 3 months ago

@luke- PR https://github.com/humhub/linkpreview/pull/21

With this PR, the image is 30% width of the wall entry width. And it has a maximum of 150px height (if the height exceeds, the width gets lower to preserve the image ration and keep the 10px space between the image and the text).

Desktop: image

Mobile: image

luke- commented 3 months ago

@marc-farre Thanks, looks good for me! I'll release a new module version now.