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

feat: added lazyloading for images #775

Closed
wants to merge 6 commits into from
Closed

feat: added lazyloading for images #775

wants to merge 6 commits into from

Conversation

Dishebh
Copy link
Member

@Dishebh Dishebh commented Apr 11, 2020

Fixes part of issue: #584

@codecov
Copy link

codecov bot commented Apr 11, 2020

Codecov Report

Merging #775 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##            develop       #775   +/-   ##
===========================================
  Coverage   8.49421%   8.49421%           
===========================================
  Files            22         22           
  Lines           259        259           
  Branches         62         62           
===========================================
  Hits             22         22           
  Misses          237        237           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 01d9c66...1167436. Read the comment docs.

@Dishebh
Copy link
Member Author

Dishebh commented Apr 11, 2020

@divyanshu-rawat pls review

Copy link
Member

@divyanshu-rawat divyanshu-rawat left a comment

Choose a reason for hiding this comment

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

see #599 you should have asked before sending out a PR.

@@ -44,8 +44,9 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.2.0/lazysizes.min.js" async></script>
Copy link
Member

Choose a reason for hiding this comment

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

We can't afford lazy-loading on the cost of lazysizes.min.js.

Copy link
Member

Choose a reason for hiding this comment

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

Another tip is to add it using NPM https://www.npmjs.com/package/lazysizes instead of CDN in public directory.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do so

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. Pls review

Copy link
Member

Choose a reason for hiding this comment

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

Have you read what is written in #599 you are still making use of package I am mentioning again We can't afford lazy-loading on the cost of lazysizes.min.js.
The tip was just for your information that you should always install a library via NPM. i didn't meant that if you install the same library using NPM then we will merge it.

If you might have read carefully what is written in #599 that you might have already understood what I was trying to convey.

In summary #599 also adds the package through NPM see her https://github.com/Ignitus/Ignitus-client/pull/599/files#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R32, do your PR is not making any difference we closed #599 because of cost of additional package to lazy load images, and the cost of adding an NPM package is it also increase the bundle size so it doesn't provide us much value, so we prefer to load images from GCP instead.

I am closing the PR now, as we already use GCP , and please ask before taking up the issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

@divyanshu-rawat seems like I took the wrong idea, sorry for any inconveniences caused. I thought you were asking to add lazymin via npm and not cdn. Duh, a bad misunderstanding.

Copy link
Member

Choose a reason for hiding this comment

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

Cool 😀

@Dishebh Dishebh deleted the lazy-load branch April 16, 2020 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants