Skip to content

A Github Action to Analyse your static image files and warns if the size increase the threshold size. It check for .jpg, .svg, .png, .gif, .jpeg, .webp and .riv files.

Notifications You must be signed in to change notification settings

immutable/assets-checker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assets Check Bot

This repository hosts a simple github action to analyse your repository for static image files when generating a pull request and then warns when it finds images which are over the file-size threshold.

It currently checks all .jpg, .svg, .png, .gif, .jpeg, .webp, and .riv files.

Install

npm i
# or
yarn install

Build

npm run build

Output Stats

Success

Screenshot 2024-05-23 at 4 28 37 PM

Failure

Screenshot 2024-05-23 at 4 30 21 PM

.assets-ignore file

Sometimes its not possible to optimise an image, or you may not need to because you're utilising Biome's inbuilt aws-image-resizer functionality. In cases like these, we can ignore these files by using a .assets-ignore file inside the root of the repository.

Screenshot 2022-08-24 at 4 49 39 PM

The ignore assets name must be add as full path and separate - separate lines:

Screenshot 2022-08-24 at 4 49 39 PM

Usage:

Check Demo.yml for complete configuration(on using github actions)

License

The scripts and documentation in this project are released under the MIT License

About

A Github Action to Analyse your static image files and warns if the size increase the threshold size. It check for .jpg, .svg, .png, .gif, .jpeg, .webp and .riv files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%