AlexRogalskiy / github-action-image-resizer

📰 GitHub action for images resizing
https://github.com/marketplace/actions/image-resizer
GNU General Public License v3.0
3 stars 1 forks source link
github-actions image-resizing

Image Resizer

GitHub Action to resize images (jpeg, png, webp, avif, tiff, gif, svg) from file/url

GitHub marketplace

management: perfekt👌 code style: prettier Mergify Status Reviewed by Hound Chat

DeepSource DeepScan grade GitHub tag (latest by date) GitHub Release Date Lines of code GitHub closed issues GitHub closed pull requests GitHub repo size GitHub last commit GitHub language count GitHub search hit counter GitHub Repository branches GitHub Repository dependents Renovatebot Dependabot NewReleases Hits-of-Code dependencies Status dependencies Status

Codeac Coverage Status codebeat badge Total alerts Language grade: JavaScript codecov CI CircleCI GitHub Super-Linter Commitizen friendly ComVer Public workflows that use this action. Licence

Chat Open questions Open bugs

Table of contents

Description

Typescript Project Status: Active – The project has reached a stable, usable state and is being actively developed. Project created status Project updated status

Provides operations on resizing input images from a file or url (jpeg, png, webp, avif, tiff, gif, svg) by format parameters.

Inputs

sourceData

Optional JSON data source file with action parameters:

Complete parameters

[
    {
        "width": 150,
        "height": 250,
        "quality": 100,
        "formatType": "jpeg",
        "sourceFile": "./data/input.jpg",
        "targetPath": "./data",
        "targetFile": "output.jpg"
    },
    {
        "width": 250,
        "height": 250,
        "formatType": "png",
        "sourceFile": "./data/input2.png",
        "targetPath": "./data",
        "targetFile": "output2.png"
    },
    {
        "width": 350,
        "height": 350,
        "formatType": "jpeg",
        "sourceFile": "https://lunrjs.com/images/moon.jpg",
        "targetPath": "./data"
    }
]

Basic parameters

[
    {
        "width": 150,
        "height": 250,
        "formatType": "jpeg",
        "sourceFile": "./data/input.jpg",
        "targetPath": "./data"
    },
    {
        "width": 250,
        "height": 250,
        "formatType": "png",
        "sourceFile": "./data/input2.png",
        "targetPath": "./data"
    },
    {
        "width": 350,
        "height": 350,
        "formatType": "jpeg",
        "sourceFile": "https://lunrjs.com/images/moon.jpg",
        "targetPath": "./data"
    }
]

width

Required Target image width

height

Required Target image height

quality

Optional Target image quality (should be in range 0-100)

formatType

Required Target image format type (any from the list: heic, heif, avif, jpeg, png, raw, tiff, webp, gif)

sourceFile

Required Source input image file or url to fetch content from

targetPath

Required Target path to store processed image files

targetFile

Optional Target image file name (default sourceFile)

Outputs

changed

Image file processing operation status

true

When input image file successfully processed

false

When error occurred while processing input image file

Examples

- name: Resize images
  uses: alexrogalskiy/github-action-image-resizer@master
  with:
    prefix: '<!--views:marker:start-->\n'
    suffix: '\n<!--views:marker:end-->'
    sourceFile: './data/info.md'
    placeholder: '<!--views:marker:start-->[\s\S]*?<!--views:marker:end-->'
    replacement: '<p align="center" style="text-align:center;">Data Block</p>'

Running locally:

Visitor stats

GitHub page hits

GitHub stars GitHub forks GitHub watchers

Licensing

Image Resizer is distributed under LGPL version 3 or later, [License]. LGPLv3 is additional permissions on top of GPLv3.

license

Authors

Image Resizer is maintained by the following GitHub team-members:

with community support please contact with us if you have some question or proposition.

Versioning

The project uses SemVer for versioning. For the versions available, see the tags on this repository.

Contribution

Contributors Display

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us (emoji key).

This project follows the all-contributors specification. Contributions of any kind are welcome!

PRs Welcome Github contributors

See also the list of contributors who participated in this project.

Acknowledgement

Stargazers repo roster for @AlexRogalskiy/github-action-image-resizer

Forks

Forkers repo roster for @AlexRogalskiy/github-action-image-resizer

Development Support

Like Image Resizer ? Consider buying me a coffee :)

Become a Patron Buy Me A Coffee KoFi


forthebadge forthebadge forthebadge