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

refactor: crop circle in SVG (4/4) #95

Merged
merged 12 commits into from
Nov 6, 2024

Conversation

privatenumber
Copy link
Member

@privatenumber privatenumber commented Nov 6, 2024

Important

This is a PR against #94
Diff: privatenumber/sponsorkit@optimize-cache-more...separate-cropping
#94 should be merged first

Description

  • The cropping functionality didn't really belong in the resize function, and made the resized image less re-usable

  • I moved the cropping logic to the SVG level so we don't need to call sharp for every avatar we want to crop into a circle

  • It's a subtle difference but the crop is cleaner now too

Before

sponsors

After

sponsors

Linked Issues

Additional context

@privatenumber privatenumber marked this pull request as ready for review November 6, 2024 03:12
@antfu antfu merged commit 8deca9d into antfu-collective:main Nov 6, 2024
1 check passed
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