feat: generate blur data async on the backend#78
Merged
cybervoid0 merged 1 commit intomasterfrom Oct 11, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR migrates blur data generation from synchronous client-side processing to asynchronous server-side processing using Sharp library for better performance and user experience.
- Removed client-side
getThumbnailBase64function and moved blur generation to server - Implemented new server-side blur data generation using Sharp with async processing via Next.js
after()function - Updated all image creation workflows to use the new async blur data generation pattern
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| utils/index.ts | Removed export of deprecated getThumbnailBase64 function |
| utils/images.ts | Removed client-side getThumbnailBase64 function implementation |
| server/images/blur.ts | New server-side blur data generation using Sharp library |
| server/images/actions.ts | Added async blur data creation workflow with database updates |
| scripts/tunnel.ts | Increased tunnel establishment timeout from 2s to 5s |
| components/ui/spinner.tsx | Changed LoadingOverlay positioning from absolute to fixed |
| components/elements/image/image.tsx | Added conditional blur placeholder logic |
| Multiple schema files | Updated image creation to use new async createImagesInDb function |
| Brand edit components | Improved loading states and image deletion handling |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| .resize(64, 64, { fit: 'inside' }) // Larger size for more detail | ||
| .blur(1.5) // Slightly less blur to preserve more detail | ||
| .png({ | ||
| quality: 60, // Higher quality for better colors |
There was a problem hiding this comment.
The quality option is not valid for PNG format in Sharp. This option is only available for JPEG format. Consider removing this line or switching to JPEG format if quality control is needed.
Suggested change
| quality: 60, // Higher quality for better colors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
generate blur data async on the backend