Skip to content

Fix: Hide "Edit Image" button for unsupported non-JPEG files#6653

Open
Kota-Jagadeesh wants to merge 1 commit intocommons-app:mainfrom
Kota-Jagadeesh:disable-edit-unsupported-formats
Open

Fix: Hide "Edit Image" button for unsupported non-JPEG files#6653
Kota-Jagadeesh wants to merge 1 commit intocommons-app:mainfrom
Kota-Jagadeesh:disable-edit-unsupported-formats

Conversation

@Kota-Jagadeesh
Copy link
Collaborator

Description (required)

Fixes #6642 (comment)

What changes did you make and why?

  • Added a file extension check in UploadMediaDetailFragment to verify if the uploaded image is a JPEG.
  • Hides the "Edit Image" button (llEditImage.visibility = View.GONE) for non-JPEG formats like GIF, PNG, and WEBP.
  • Why: the underlying image rotation library (LLJTran) only supports lossless JPEG transformations. Attempting to edit and save other file types resulted in errors and blank images. so, hiding the edit option for unsupported files is the cleanest ux solution.

Tests performed (required)

Tested ProDebug on Redmi Note 13 Pro with API level 35.

  • Uploaded a .jpg file -> "Edit Image" button is visible and works.
  • Uploaded a .gif and .png file -> "Edit Image" button is completely hidden.

Screenshots (for UI changes only)

image

Note: Please ensure that you have read CONTRIBUTING.md if this is your first pull request.

@Kota-Jagadeesh Kota-Jagadeesh marked this pull request as ready for review February 15, 2026 04:32
@github-actions
Copy link

✅ Generated APK variants!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments