omrajsharma / bigohhh.com

Frontend codebase for a coding bootcamp website.
https://bigohhh.com
30 stars 52 forks source link

Image loading time enhancement #19

Open omrajsharma opened 1 month ago

omrajsharma commented 1 month ago

Currently images in the application are of high resolution and having bigger size causing issue in loading and make application image loading jittering.

abhiperfect commented 1 month ago

Subject: Proposal: Implementing Lazy Loading for Images to Improve Application Performance

Hi @omrajsharma ,

I hope this message finds you well. I've been exploring ways to enhance the performance of our application, particularly regarding image loading issues caused by high-resolution images with larger file sizes.

Here's a proposed solution using lazy loading to mitigate these issues:

Steps to Implement Lazy Loading for Images:

  1. Identify Image Components: Begin by identifying the components in our application that render images. These could be product images, profile pictures, or any other visual elements.

  2. Install Lazy Loading Library: Choose a lazy loading library compatible with our technology stack. React has several popular options like react-lazyload or React.lazy.

  3. Integrate Lazy Loading: Implement lazy loading for the identified image components. This involves wrapping each image component with the lazy loading wrapper provided by the chosen library.

  4. Set Thresholds: Configure lazy loading thresholds to determine when images should start loading. This ensures that images are loaded only when they are close to the viewport, reducing unnecessary loading of off-screen images.

  5. Optimize Image Loading: Alongside lazy loading, optimize the images themselves by reducing their resolution and file sizes. Tools like ImageMagick or online services can be used to compress images without significant loss of quality.

  6. Test and Refine: Thoroughly test the application to ensure that lazy loading is functioning as expected. Monitor performance metrics like page load times and image loading speeds, and refine the implementation as necessary.

Expected Benefits:

By implementing lazy loading for images in our application, we can address the performance issues caused by high-resolution images with larger file sizes, resulting in a more optimized and user-friendly experience.

I'm keen to take on this task and contribute to enhancing our application's performance. Could you please assign this task to me?

Looking forward to your feedback and guidance.

Best regards, Abhishek

omrajsharma commented 1 month ago

Hi @abhiperfect I'm assigning this issue to you.