Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change screenshot image type from JPEG to WEBP #211

Merged
merged 4 commits into from
Jan 7, 2025

Conversation

marandaneto
Copy link
Member

@marandaneto marandaneto commented Dec 4, 2024

💡 Motivation and Context

File Info
• Resolution: 1080×2400
• MIME type: image/octet-stream
• Extension: bin
• Size: 6.69 KB
• Download: image.bin
WEBP_LOSSY

File Info
• Resolution: 1080×2400
• MIME type: image/octet-stream
• Extension: bin
• Size: 310.68 KB
• Download: image.bin
WEBP_LOSSLESS

File Info
• Resolution: 1080×2400
• MIME type: image/octet-stream
• Extension: bin
• Size: 6.69 KB
• Download: image.bin
WEBP or WEBP_LOSSY

File Info
• Resolution: 1080×2400
• MIME type: image/png
• Extension: png
• Size: 20.45 KB
• Download: image.png
• Bit depth: 8
PNG

File Info
• Resolution: 1080×2400
• MIME type: image/jpeg
• Extension: jpg
• Size: 20.25 KB
• Download: image.jpg
• Channels: 3
• Bit depth: 8
JPEG

Also this https://github.com/PostHog/posthog-ios/blob/5dceb9b86f6c65c1dcc6d18ae97e1face7236636/PostHog/Replay/PostHogReplayIntegration.swift#L178
Since the base64 image is lossy and loses all metadata, we won't be resending a new snapshot in case nothing changes in the generated image.

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

@marandaneto marandaneto requested a review from a team December 4, 2024 09:09
Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

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

🚀

@marandaneto marandaneto marked this pull request as ready for review January 7, 2025 10:41
@marandaneto marandaneto merged commit f28f9d2 into main Jan 7, 2025
5 checks passed
@marandaneto marandaneto deleted the chore/image-webp branch January 7, 2025 10:57
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.

2 participants