Skip to content

Conversation

@LakshananS
Copy link
Collaborator

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.

@LakshananS LakshananS requested a review from bsaranga October 24, 2024 07:13
Copy link
Contributor

@bsaranga bsaranga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

setImages(base64Images);

// Process images and resize them
const resizedBase64Images = await Promise.all(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goal of resizing the image is to reduce the base64 string length

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.

3 participants