Skip to content

Auto Upload: JPEG conversion uses compressionQuality 1.0, tripling file size (regression in #4223) #4287

Description

@naelfe

Steps to reproduce

  1. iOS Camera set to "High Efficiency" (HEIC), 24 MP (never manually changed in iOS)
  2. Enable Auto Upload with compatibility mode (HEIC -> JPEG)
  3. Compare the uploaded JPEG size before and after app version 34.1.2

Actual behaviour

Same source photo (5712x4284, ~7 MB HEIC) now produces a ~23 MB JPEG.
Before 34.1.2 the same kind of photo produced ~8 MB. (first observed at around 2026-08-26)

Expected behaviour

Converted JPEGs should stay in a reasonable size range. Quality 0.8-0.9 is
visually indistinguishable here and produces roughly a third of the filesize.

Cause

In iOSClient/Utility/NCCameraRoll.swift, commit 82634b5 (PR #4223)
added options: [compressionQuality: 1.0] to the jpegRepresentation call.
Previously no options were passed and Core Image's default was used.

Quality 1.0 forces the encoder into a very inefficient mode, and since the
source is an already-compressed HEIC, its compression artifacts get encoded
into the JPEG as well. Apple confirms this behaviour and recommends ~0.8:
https://developer.apple.com/forums/thread/793946

Suggestion

Lower the constant to 0.85, or expose it as a setting next to the existing
compatibility-mode toggle.

Environment

  • iPhone 16, iOS 26.6.1
  • Nextcloud iOS app: 34.1.4.1
  • Nextcloud server: 34.0.3

Hope this helps :-)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions