86b2kunbc-base64-enhancement: Implemented API route to fetch and serve base64 image strings from images.json#6
Open
LakshananS wants to merge 2 commits intodevelopmentfrom
Open
Conversation
…e base64 image strings from images.json
bsaranga
suggested changes
Oct 24, 2024
Contributor
bsaranga
left a comment
There was a problem hiding this comment.
Let's scale down the image so that it's no greater than the card component size. For example if the entire card component display size is 600x400 pixels, the image size should be lower than this. Recreate base64 after reducing image size.
…y resized before displaying them.
bsaranga
suggested changes
Oct 24, 2024
| setImages(base64Images); | ||
|
|
||
| // Process images and resize them | ||
| const resizedBase64Images = await Promise.all( |
Contributor
There was a problem hiding this comment.
This is not what I meant. Don't resize the image when loading it in the component. Resize and store the image as base64 in the json file. Hope you got it.
Contributor
There was a problem hiding this comment.
Goal of resizing the image is to reduce the base64 string length
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.
Implemented a new API route to fetch and serve base64 image strings from a JSON file. Updated the VenueCard component to display images using a carousel, enhancing the visual presentation. Added error handling in the API route to manage potential file read issues.