nextcloud / nextcloud/server

Allow setting "Crop image preview" for public shares

Open
#52,550 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement feature: previews and thumbnails feature: sharing
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

Similar to https://github.com/nextcloud/server/issues/39027

Allow to configure files settings for the public share view.


⚠️ This issue respects the following points: ⚠️
Bug description

Hi
When i uncheck "Crop image preview" it works for me but not not for the share. The share keeps showing cropped squares.

On the working side the parameter a=1 is toggled like this ...core/preview?fileId=1234&x=128&y=128&mimeFallback=true&v=1234&a=1

but on the share side maybe the a=1 parameter is not propagated or something?

Image
Image
Image

Steps to reproduce
Expected behavior

i'd expect aspect ratio of the original photo is maintained (not shown as a square)

Nextcloud Server version

30

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

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

No file or test is named. Start by tracing how the public-share view builds image preview requests and compare them with the working request, focusing on whether the crop setting is propagated; done means public-share previews preserve the original aspect ratio when cropping is disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
web-dev
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.