Skip to content

Add full SVG support#7020

Merged
bmarty merged 4 commits into
element-hq:developfrom
bxdxnn:misc/svg-support
Jul 8, 2026
Merged

Add full SVG support#7020
bmarty merged 4 commits into
element-hq:developfrom
bxdxnn:misc/svg-support

Conversation

@bxdxnn

@bxdxnn bxdxnn commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Content

Support SVG throughout the app (avatars, timeline, media, etc.)

Needs matrix-org/matrix-rust-sdk#6662

  1. Revert Send SVG images as files #4595
    2. Wire Coil's SvgDecoder to media loader
  2. Fallback to full content fetching in case a thumbnail doesn't exist
  3. Fetch a bit more metadata from the SVG when sending it (thumbnail still won't be set because SVGs are commonly light in size like normal messages)

Motivation and context

There was poor to no support before.

Screenshots / GIFs

Tests

Tested devices

  • Physical
  • Emulator
  • OS version(s): 16

Checklist

@bxdxnn bxdxnn requested a review from a team as a code owner June 14, 2026 10:22
@bxdxnn bxdxnn requested review from ganfra and removed request for a team June 14, 2026 10:22
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Here are a few things to check in the PR to ensure it's reviewed as quickly as possible:

  • If your pull request adds a feature or modifies the UI, this should have an equivalent pull request in the Element X iOS repo unless it only affects an Android-only behaviour or is behind a disabled feature flag, since we need parity in both clients to consider a feature done. It will also need to be approved by our product and design teams before being merged, so it's usually a good idea to discuss the changes in a Github issue first and then start working on them once the approach has been validated.
  • Your branch should be based on origin/develop, at least when it was created.
  • The title of the PR will be used for release notes, so it needs to describe the change visible to the user.
  • The test pass locally running ./gradlew test.
  • The code quality check suite pass locally running ./gradlew runQualityChecks.
  • If you modified anything related to the UI, including previews, you'll have to run the Record screenshots GH action in your forked repo: that will generate compatible new screenshots. However, given Github Actions limitations, it will prevent the CI from running temporarily, until you upload a new commit after that one. To do so, just pull the latest changes and push an empty commit.

@github-actions github-actions Bot added the Z-Community-PR Issue is solved by a community member's PR label Jun 14, 2026

@bmarty bmarty left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, a few remarks.

@bmarty bmarty left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. 2 more remarks then I think that we're good to merge this change.

@bmarty bmarty left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 54.23729% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.62%. Comparing base (a3a0fda) to head (4fd0be1).
⚠️ Report is 252 commits behind head on develop.

Files with missing lines Patch % Lines
...ibraries/mediaupload/impl/SvgDimensionExtractor.kt 48.38% 9 Missing and 7 partials ⚠️
...roid/libraries/matrix/ui/media/CoilMediaFetcher.kt 0.00% 6 Missing ⚠️
...oid/libraries/matrix/impl/media/RustMediaLoader.kt 0.00% 2 Missing ⚠️
.../libraries/matrix/api/exception/ClientException.kt 0.00% 1 Missing ⚠️
.../libraries/matrix/ui/media/ImageLoaderFactories.kt 0.00% 1 Missing ⚠️
...aries/mediaupload/impl/AndroidMediaPreProcessor.kt 94.44% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7020      +/-   ##
===========================================
- Coverage    80.64%   80.62%   -0.02%     
===========================================
  Files         2678     2679       +1     
  Lines        76229    76283      +54     
  Branches     10252    10265      +13     
===========================================
+ Hits         61474    61503      +29     
- Misses       10824    10842      +18     
- Partials      3931     3938       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bmarty bmarty merged commit 6124d99 into element-hq:develop Jul 8, 2026
26 of 29 checks passed
@bxdxnn bxdxnn deleted the misc/svg-support branch July 8, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants