Connor's Code & Coffee

Connor's Code & Coffee

  • Blog
  • About
  • Contact

8/25/2021

Compress Image Within Angular Or React

0 Comments

Read Now
 
You might need to compress an image for a web application without a server. I've built an example of a web side image compressor here that works in Angular.

There's a package compressorjs that does just this. I'm going to be using Typescript for this example but it would be pretty easy to just take the types out if you're using vanilla Javascript.
Install compressorjs into your web app

    
import compressorjs 

    
Add a Compress Function

    

Share

0 Comments



Leave a Reply.

Details

    Author

    Hi I'm Connor, I've been programming for awhile and then decided to make it my career. Hope you find it as interesting as I do!

    Categories

    All

    RSS Feed

Powered by Create your own unique website with customizable templates.
  • Blog
  • About
  • Contact