Skip to content

Commit

Permalink
chore: add comments to remind about the output changes
Browse files Browse the repository at this point in the history
  • Loading branch information
edysegura committed May 21, 2024
1 parent 4d7e207 commit 1d8e121
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion image-compress/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ FilePond.registerPlugin(
)

const pondConfig = {
allowMultiple: false,
allowMultiple: true,
allowFileTypeValidation: true,
acceptedFileTypes: ['image/*'],
imageResizeTargetWidth: 300,
Expand All @@ -33,6 +33,8 @@ const pond = FilePond.create(
pondConfig,
)

// if the imageTransformVariants option is set, the prepare file event
// will receive an array of transformed blobs
pond.on('preparefile', (metadata, output) => {
const [ transformedOutput ] = output
console.log('File size before compression:', metadata.file.size)
Expand Down

0 comments on commit 1d8e121

Please sign in to comment.