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

WIP metadata image optimisation #260

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

bitbeckers
Copy link
Collaborator

Works on #257

When the MetadataImageService gets a request, try and fetch the image
form an in memory cache. If not present, fetch from Supabase and
compress the image using sharp.

Opted for compressions with webp as that should be nice for web images.

Proof of concept

Jipperism and others added 5 commits January 30, 2025 14:31
fix: improve error handling in hypercert orders resolver
Refactors the SupabaseCachingService to get all hypercert columns except
for the image. Renamed the getMetadata method to getMetadataWithoutImage
to make this explicit.

Introduces MetadataImageService for fetching the image when the field is
selected in a metadata query.
When the MetadataImageService gets a request, try and fetch the image
form an in memory cache. If not present, fetch from Supabase and
compress the image using sharp.

Opted for compressions with webp as that should be nice for web images.

Proof of concept
@bitbeckers bitbeckers added the enhancement New feature or request label Feb 11, 2025
@bitbeckers bitbeckers self-assigned this Feb 11, 2025
@bitbeckers bitbeckers changed the title Feat/metadata image optimisation WIP metadata image optimisation Feb 11, 2025
Copy link

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 24.24% (🎯 24%) 1049 / 4327
🟢 Statements 24.24% (🎯 24%) 1049 / 4327
🟢 Functions 59.78% (🎯 59%) 55 / 92
🟢 Branches 72.13% (🎯 72%) 176 / 244
File CoverageNo changed files found.
Generated in workflow #61 for commit 43eb06b by the Vitest Coverage Report Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

2 participants