Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Strapi thumbnail plugin

Installation

Add plugin package

# using yarn
yarn add strapi-plugin-thumbnail

# using npm
npm install strapi-plugin-thumbnail --save

Rebuild Admin Panel

# using yarn
yarn build --clean

# using npm
npm run build --clean

Usage

Add config/thumbnails.js where u can configurata witch thumbnails can be generated.

module.exports = ({ env }) => ({

    desktop: {
        type: 'resize',
        options: {
            width: 782,
            fit: 'contain'
        }
    },

    mobile: {
        type: 'resize',
        options: {
            width: 320,
            height: 160,
            fit: 'cover'
        }
    },
    
    other_thumbnail_name: {
        type: 'greyscale',
    },

});

This plugin uses Sharp to make the thumbnails.

The following functions are available

resize
extend
extract
trim
rotate
flip
flop
sharpen
median
blur
flatten
gamma
tint
toColourspace
removeAlpha
greyscale

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages