Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@flowaccount/scully-plugin-lazy-load-picture-tag

Package Overview
Dependencies
Maintainers
5
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flowaccount/scully-plugin-lazy-load-picture-tag

I wrote this as an :paperclip: `angular-paperclip` :paperclip: experiment from the talk by **Misko Hevery (@mhevery)** from the [Keynote in NGCONF 2019](https://nitayneeman.com/posts/all-talks-from-ng-conf-2019/#keynote-1)

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
40
decreased by-4.76%
Maintainers
5
Weekly downloads
 
Created
Source

scully-plugin-lazy-load-picture-tag

I wrote this as an :paperclip: angular-paperclip :paperclip: experiment from the talk by Misko Hevery (@mhevery) from the Keynote in NGCONF 2019

It is a lazy effort to lazy load images that lies int the <picture> tags. I am not sure why, since the srcset probably does that for you, but lighthouse stills complains about it. And instead of replacing all the possible tags in the code, I chose to lazy-load it using the adaptation for lazyload package that does the img tag instead.

You can specify the placeholder image when lazyloading the img, which is a nice touch for mobile slow 3g/4g :smile:

Read more about the experiment at this article --> Angular Paperclip Experiment

Installation

To install this library with npm run

npm install scully-plugin-lazy-load-picture-tag --save-dev

or with yarn

yarn add scully-plugin-lazy-load-picture-tag --dev

Usage

  • Add this to your scully.config.ts file
import { getLazyLoadPictureTagPlugin } from '@flowaccount/scully-plugin-lazy-load-picture-tag';

const postRenderers = [
  getLazyLoadPictureTagPlugin({
    imagePlaceholder:
      'https://flowaccountcdn.com/new_landing/image/White_2px.jpg'
  })
];

export const config: ScullyConfig = {
  routes: {},
  defaultPostRenderers: postRenderers
};
yarn scully

This is an adaptation from scully-plugin-disable-angular

Keywords

FAQs

Package last updated on 22 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc