fix: change OGP image from SVG to PNG for better social media compatibility#178
fix: change OGP image from SVG to PNG for better social media compatibility#178
Conversation
…bility Many social platforms do not support SVG format for Open Graph Protocol previews. Using PNG format ensures the logo displays correctly on Twitter, Facebook, LinkedIn, etc.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
ccusage-guide | 7d6f1de | Jun 23 2025, 10:06 AM |
|
Caution Review failedThe pull request is closed. WalkthroughThe Open Graph image URL in the Vitepress documentation site's configuration was updated, changing the reference from a Changes
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Summary of Changes
Hello @ryoppippi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request resolves a display issue with the Open Graph Protocol (OGP) image on social media platforms. By switching the OGP image format from SVG to PNG, the project's logo will now correctly appear in link previews when shared, ensuring a consistent and professional presentation across different social networks.
Highlights
- OGP Image Format Compatibility: I've updated the Open Graph Protocol (OGP) image reference in the VitePress configuration from an SVG file (
logo.svg) to a PNG file (logo.png). This change directly addresses compatibility issues with various social media platforms that do not properly render SVG images for link previews.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
commit: |
There was a problem hiding this comment.
Code Review
This pull request correctly identifies that using a PNG for the Open Graph image will provide better compatibility with social media platforms than an SVG. The change to the VitePress configuration reflects this.
However, there is a critical issue: the logo.png file that the configuration now points to has not been added to the repository in this pull request. This will lead to a broken image link. Please add the logo.png file to the docs/public/ directory to resolve this issue. Once that's done, the PR should achieve its goal.
| ['meta', { property: 'og:title', content: 'ccusage | Claude Code Usage Analysis' }], | ||
| ['meta', { property: 'og:site_name', content: 'ccusage' }], | ||
| ['meta', { property: 'og:image', content: 'https://cdn.jsdelivr.net/gh/ryoppippi/ccusage@main/docs/public/logo.svg' }], | ||
| ['meta', { property: 'og:image', content: 'https://cdn.jsdelivr.net/gh/ryoppippi/ccusage@main/docs/public/logo.png' }], |
There was a problem hiding this comment.
While changing the OGP image to a PNG is a great idea for better compatibility with social media platforms, this pull request appears to be missing the logo.png file itself. The configuration now points to .../logo.png, but this file is not being added in this PR.
This will result in a 404 error for the og:image, which will prevent any image from showing up. Please ensure you add the logo.png file to the docs/public/ directory as part of this change.
Summary
Problem
Many social platforms (Twitter, Facebook, LinkedIn) do not support SVG format for Open Graph Protocol previews, causing the logo to not display properly when sharing links.
Solution
Updated the og:image meta tag to use logo.png instead of logo.svg. The PNG format is universally supported by all major social media platforms.
Test plan
Summary by CodeRabbit