decaporg / decaporg/decap-cms

Integrating Compressor.js for image uploading optimization

Open
#7,107 13 comments 2 reactions 0 assignees View on GitHub
area: media-library type: feature
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

As suggested in issue [decap-website#14](/decaporg/decap-website/issues/14), it is worth considering integrating [Compressor.js](https://fengyuanchen.github.io/compressorjs/) which appears to be a client-side JS image compression library which:

> Uses the Browser's native [canvas.toBlob](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob) API to do the compression work.

It is made by @fengyuanchen and is in this [repo](https://github.com/fengyuanchen/compressorjs) and seems mature and stable.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing decap-website#14 and the existing client-side image-upload path, then compare its behavior with Compressor.js and the browser canvas.toBlob API. Done means the integration scope is decided and compressed uploads are verified without breaking the upload flow; no repository file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.