Vue.js lazy load image directive with akamai image converter

Overview

vue-lazyload-akamai

Vue.js lazy load image directive with akamai image converter

License version downloads

💅 Demo Page

https://bliblidotcom.github.io/vue-lazyload-akamai/

or via forked version here: https://mazipan.github.io/vue-lazyload-akamai/

🛠 Install with NPM/Yarn

npm install vue-lazyload-akamai
// OR
yarn add vue-lazyload-akamai

🚀 Usage Guide

Add plugins in main.js

import VueLazyloadAkamai from 'vue-lazyload-akamai'
Vue.use(VueLazyloadAkamai, {optionalConfigs})

Available configs explanations:

Config Name Type Description
useWebp Boolean Using webp when support
quality Number Quality of image (using scala from 10-100)
width & height Number Width and Height of image (in pixel unit)
fallback String Global fallback image if attr data-err not setted
placeholder String Global placeholder image if attr src not setted
timeout Number Timeout before image replaced (in millisecond unit)

Using in your Vue components:

">
<img v-lazyimg
    src="{placeholder image}"
    data-src="{original image}"
    data-err="{fallback image}">

Attribute explanations:

Attribute Name Description
src Use as placeholder/loading image before original image was loaded.
data-src Original image that we want to load after user scroll to it's sections
data-err Image as fallback when original image failed to load (404 response)
data-quality Quality of image (using scala from 10-100)
data-width Width of image in pixel unit
data-height Height of image in pixel unit

🗿 Polyfill

https://github.com/w3c/IntersectionObserver/tree/master/polyfill

▶️ Development

// For development
npm run dev

// For build demo page
npm run build-demo

// For build library file
npm run build-lib

// Publish demo page
npm run publish-demo

// Build and publish demo
npm run dist

Copyright © 2018 by Blibli.com Tech Team - Released Under MIT License

You might also like...
A Vue lazy loading directive.

A Vue lazy loading directive.

:camera: Mini Image Lazy Loader for P(R)eact and Vue
:camera: Mini Image Lazy Loader for P(R)eact and Vue

Pimg is a Progessive Image Component For React, Preact and Vue.js. It helps in lazy loading of images in a nice and cool way. It's 2KB (gzipped). It h

A small lazy image loader for Vue

lazy-vue lazy-vue is the easiest way to get a lazy image loader working within your vue projects. It is meant to be as simplest as possible, so you do

A super simple image lazy loader for Vue.

cube-vue-image-lazy A super simple image lazy loader for Vue. Install yarn add cube-vue-image-lazy Warning: You'll need to install the w3c Intersectio

Vue 2 image and video loader supporting lazy loading, background videos, fixed aspect ratios, low rez poster images, transitions, loaders, slotted content and more.

Vue Visual Vue 2 image and video loader supporting lazy loading. Visual 2.x is a simplification of Version 1.x with a greater reliance on modern brows

Create lazy image, embed, video and element with animation just with attributes.

📖 Lazy-attr v1.2.3 Create lazy loading request or element like image, iframe, video... Make custom animation on lazy and not lazy element on all brow

A Vue.js component to load an image automatically when it enters the viewport.

A Vue.js component to load an image automatically when it enters the viewport.

Flexible modal component for Vue with ability of asynchronous lazy loading

vue-async-modal Flexible modal component for Vue with ability of asynchronous lazy loading Usage Firstly, you should add Modal component in your templ

A vue component for sleek and optimal lazy loading

sloth-loader 🦥 Image Lazy loader Vue Component with intersection observer Example here Installation yarn add sloth-loader npm i sloth-loader import c

Comments
  • Feature/prepare-publish-npm

    Feature/prepare-publish-npm

    • Remove rollup build - change to webpack
    • Fixing some files for preparing publish in npm registry
    • Change theme color in demo - using Blibli.com blue hex
    • Already published v1.0.0 in https://www.npmjs.com/package/vue-lazyload-akamai
    opened by mazipan 0
Owner
Blibli.com
Big Choices Big Deals
Blibli.com
Vue.js Image Kit Component with Lazy Load built in and Responsive Images

Vue Image Kit Vue.js Image Kit Component with Lazy Load built in and Responsive Images The inspiration comes from this and a talk from @derevandal in

Igor Guastalla 9 Mar 31, 2022
Lazy load background images for Vue 2

Lazy Background Images for Vue vue-lazy-background-images A simple Vue component for lazy loading background components. This component is only for ba

Darryn Ten 67 Nov 24, 2022
Component-based lazy (CLazy) load images in Vue.js 2

Vue Clazy Load Claziest lazy loader out there! Component-based image lazy loader for Vue.js 2 Swaps between your image and another component when load

Matheus Grieger 107 Nov 16, 2022
A Lazy load plugin for Vue 3.x

vue3-lazy Status: Alpha. Lazy load plugin for Vue 3.x inspired by vue-lazyload. This plugin support very simple options, and easy to use. Install $ np

null 2 Feb 8, 2022
A Vue.js component to lazy load images using the Intersection Observer.

vue-li-image A Vue.js component to lazy load an image automatically when it enters the viewport using the Intersection Observer API.

null 0 Mar 19, 2021
vue lazy container,By detect the visibility of elements in the page, decide whether to load resources and render.

vue lazy container,By detect the visibility of elements in the page, decide whether to load resources and render.

null 5 Sep 25, 2022
A plugin of lazy-load images for Vue2.x

vue-lazyload-images A plugin of lazy-load images for Vue2.x Support images lazyload in window or build-in element. Demo Installation npm $ npm install

LowesYang 61 Nov 19, 2022
The easiest way to lazy load your content

VueLazily The easiest way to lazy load your content. Inspired by vue-promised, recommend to look at it if you need loading/errors handling without laz

Enkot 7 Oct 29, 2022
simplistic vue.js directive for image lazy loading

Vue Progressive Image Lazy load images while showing a preview. Super tiny, less than half a kilobyte minified and gzipped. usage v-lazy-img adds the

Norman 25 Aug 11, 2021
🐌 A small size Vue.js directive for lazy loading images using IntersectionObserver API

?? vue-tiny-lazyload-img A small size Vue.js directive for lazy loading images using IntersectionObserver API Demo Page https://mazipan.github.io/vue-

Irfan Maulana 91 Nov 18, 2021