You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to explore the possibility of making the user's avatar round in our Open Graph image generator. This change would enhance the visual appeal of our OG images. However, initial research suggests this might be more challenging than initially thought.
Current situation:
We're using MiniMagick for image manipulation in our OpenGraphImageGenerator class.
The avatar is currently square with a white border.
Tasks:
Research methods to create rounded avatars using MiniMagick:
Investigate the circle or roundrectangle operations in ImageMagick.
Look into creating a circular mask and compositing it with the avatar.
If a viable solution is found with MiniMagick:
Implement the rounding in the OpenGraphImageGenerator class.
Ensure the white border is maintained around the circular avatar.
Update the avatar positioning code to account for the new circular shape.
If MiniMagick proves too difficult:
Investigate alternative Ruby gems that might offer easier circular cropping (e.g., rmagick, image_processing).
Consider the performance implications of switching libraries.
If Ruby-based solutions are unsatisfactory:
Explore the feasibility of a service using Canvas and Playwright/Puppeteer.
Weigh the pros and cons of this approach (complexity, maintenance, performance).
Decision point:
Based on the research and prototyping, decide whether to proceed with rounding or keep the square avatar.
Document the decision and rationale.
Implementation:
If proceeding, implement the chosen solution.
If not proceeding, update the issue with the decision to keep square avatars.
Testing:
Ensure the OG image generator works correctly with various avatar sizes and formats.
Test performance impact, especially if a new approach is implemented.
Documentation:
Update any relevant documentation about the OG image generation process.
Remember: The goal is to enhance visual appeal, but not at the cost of significantly increased complexity or performance issues. If the square avatar proves to be the most practical solution, that's acceptable.
Note: OG images are somewhat broken in an unrelated way but shouldn't impact this issue.
The text was updated successfully, but these errors were encountered:
This seems harder than I first thought and Googling isn't finding much besides people recommending not to do it this way. I could make a service to do it with canvas and playwright or puppeteer but I don't think that is ideal. Might give it a miss and stick with square.
loftwah
changed the title
Round avatar on OG image
Investigate and Implement Rounded Avatar on OG Image
Sep 17, 2024
We want to explore the possibility of making the user's avatar round in our Open Graph image generator. This change would enhance the visual appeal of our OG images. However, initial research suggests this might be more challenging than initially thought.
Current situation:
Tasks:
Research methods to create rounded avatars using MiniMagick:
circle
orroundrectangle
operations in ImageMagick.If a viable solution is found with MiniMagick:
OpenGraphImageGenerator
class.If MiniMagick proves too difficult:
If Ruby-based solutions are unsatisfactory:
Decision point:
Implementation:
Testing:
Documentation:
Remember: The goal is to enhance visual appeal, but not at the cost of significantly increased complexity or performance issues. If the square avatar proves to be the most practical solution, that's acceptable.
The text was updated successfully, but these errors were encountered: