Skip to content

Update image proxy webp detection#3117

Merged
feruzm merged 2 commits intodevelopmentfrom
imageproxy
Feb 18, 2026
Merged

Update image proxy webp detection#3117
feruzm merged 2 commits intodevelopmentfrom
imageproxy

Conversation

@feruzm
Copy link
Copy Markdown
Member

@feruzm feruzm commented Feb 18, 2026

Summary by CodeRabbit

  • Improvements
    • Unified image rendering behavior across iOS and Android platforms for more consistent display quality.
    • Streamlined image handling and proxification to improve overall performance across all devices.
    • Simplified preview rendering logic, reducing platform-specific code for faster preview load times.
    • Enhanced consistency in post body rendering regardless of the device or operating system being used.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 18, 2026

Warning

Rate limit exceeded

@feruzm has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 37 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

The PR removes platform-specific branching throughout the codebase. Image proxification now consistently uses 'match' format instead of conditional 'webp' on Android, and post body rendering is changed from Platform.OS checks to unconditional false. Platform imports are removed where no longer needed.

Changes

Cohort / File(s) Summary
Image Proxification Standardization
src/components/autoHeightImage/autoHeightImage.tsx, src/components/postCard/children/postCardContent.tsx, src/components/profileSummary/view/profileSummaryView.tsx, src/components/uploadsGalleryModal/children/mediaPreviewItem.tsx, src/utils/image.ts
Replaced platform-specific image format selection (webp on Android, match on iOS) with unconditional 'match' format. Removed Platform import and associated runtime OS checks from image proxification logic.
Post Body Rendering Simplification
src/components/insertLinkModal/insertLinkModal.tsx, src/components/markdownEditor/view/markdownEditorView.tsx, src/providers/queries/postQueries/postQueries.ts, src/utils/postParser.tsx
Replaced Platform.OS !== 'ios' conditionals with constant false value in renderPostBody calls. Removed Platform import from components no longer needing OS detection.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Platform checks hop away, no more,
'Match' formats standardize the store,
iOS and Android, now at peace,
One rendering path brings sweet release!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Update image proxy webp detection' is partially related to the changeset. It references webp handling but doesn't capture the main scope: removing platform-specific logic (Platform.OS checks) across multiple components and utilities to standardize image proxy format handling to 'match'.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch imageproxy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/components/autoHeightImage/autoHeightImage.tsx (1)

59-61: LGTM — URL comparison will be consistent with the PR-wide 'match' change.

The imgUrl === poxifiedUrl equality check works only when both sides are proxified using the same format. Since the PR updates all other proxification call sites to 'match' as well (per the AI summary), the metadata-based aspect-ratio lookup will remain correct.

One pre-existing nitpick in the changed line: poxifiedUrl is missing an r ("proxified").

✏️ Typo fix
-          const poxifiedUrl = proxifyImageSrc(url, undefined, undefined, 'match');
+          const proxifiedUrl = proxifyImageSrc(url, undefined, undefined, 'match');
 
-          if (imgUrl === poxifiedUrl) {
+          if (imgUrl === proxifiedUrl) {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/autoHeightImage/autoHeightImage.tsx` around lines 59 - 61,
Rename the misspelled variable `poxifiedUrl` to `proxifiedUrl` in the
autoHeightImage component so the equality check `imgUrl === proxifiedUrl` is
correct; update the declaration where `const poxifiedUrl = proxifyImageSrc(url,
undefined, undefined, 'match');` and any subsequent references to use
`proxifiedUrl` (referencing proxifyImageSrc, imgUrl, and the equality branch) to
fix the typo without changing logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/components/autoHeightImage/autoHeightImage.tsx`:
- Around line 59-61: Rename the misspelled variable `poxifiedUrl` to
`proxifiedUrl` in the autoHeightImage component so the equality check `imgUrl
=== proxifiedUrl` is correct; update the declaration where `const poxifiedUrl =
proxifyImageSrc(url, undefined, undefined, 'match');` and any subsequent
references to use `proxifiedUrl` (referencing proxifyImageSrc, imgUrl, and the
equality branch) to fix the typo without changing logic.

@feruzm feruzm merged commit 76372eb into development Feb 18, 2026
@feruzm feruzm deleted the imageproxy branch February 18, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant