layzr-rails | Layzr JS Wrapper for Rails image_tag helpers | Application Framework library
kandi X-RAY | layzr-rails Summary
kandi X-RAY | layzr-rails Summary
Layzr JS Wrapper for Rails image_tag helpers for lazy loading of images
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of layzr-rails
layzr-rails Key Features
layzr-rails Examples and Code Snippets
Community Discussions
Trending Discussions on layzr-rails
QUESTION
I am using the "layzr-rails" gem to lazy load images, this works ok, but can I somehow do something else to increase page loading?
It takes almsot 6 seconds on my local machine to load the site:
...ANSWER
Answered 2018-Sep-19 at 01:31You can try moving the partials rendering to inline code and use partial caching. But rendering 1,5k images is just plain crazy. Have you tought about bottomless pagination? render a more reasonable amount of images and when the user scrolls you check the height of the scroll and the height of the content and you can do an ajax request to load more images when the user es reaching the end, and so on until there are no more images to show.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install layzr-rails
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page