nextcloud / nextcloud/viewer

Images on single-file public shares are distorted

Open
#2,534 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 1. to develop bug regression
Dominant language
JavaScript
Stars
119
Forks
72
Avg merge
18h 42m
Merged PRs (30d)
24

Description

Describe the bug
When i share an image from my nextcloud via a public link and visit this link on my smartphone, the image is displayed disproportionately compressed.

To Reproduce
Steps to reproduce the behavior:

  1. Go to your nextcloud
  2. Click on a random landscape image
  3. create a public link
  4. copy link to smartphone and open it there

Expected behavior
the image should have fullwidth while the height depends on the image format

Screenshots
original image in correct proportions: https://cloud.bueroblanko.de/s/EXadK7DqjgCadgy
expected view on mobile: https://cloud.bueroblanko.de/s/xx3Fi5EnBib3C9F
actual incorrect view on mobile: https://cloud.bueroblanko.de/s/StmEm7W77MNDyyF

Desktop (please complete the following information):
on desktop the image is displayed for all browsers correctly

Smartphone (please complete the following information):
on smartphone the issue exists on

  • chrome browser
  • safari
  • firefox

I hope this information helps to understand my issue and anyone can help with this

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the single-file public share with a landscape image on a smartphone using Chrome, Safari, or Firefox, then compare it with the provided screenshots and the correct desktop rendering. Trace the public-share image view in the viewer; done means the image spans the available width while preserving its original aspect ratio on mobile.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.