Image Compressor Implementation Codes
- Learn, try and execute to compress a image using image compressor libraies
- Get libraries and it's implementation codes to execute in your applications
- Try our online tools before you use and get a glance of how the tool works
- A total of 6 image file extensions are supported. GIF, ICO, JPEG, JPG, PNG, and WEBP
- Learn how to implement the codes, it's doumentaion, rules, limitations, accessing and more
- Download libraries, try online tools, use our implementation codes and make your work easy
Rules
- You need to use in js or jquery format
- File data and Compression format should be sent throught the function convertImage()
- convertImage() conatains two parameters
- File Input: Sending filde data through first parameter directely from the file without modifications
- Compression Format: The conversion extension of the file choose any one of 4 options
- Both parameters are required and in ordered format - convertImage(fileInput, CompressionFormat);
- Apart from that you can change the way you want but keep the values of 4 Compression Format 1,2,3 and 4 respectively given in implemetaion codes same.
- 1 - Best Compression
- 2 - Extreme Compression
- 3 - Medium Compression
- 4 - Low Compression
Limitaions
- You can only send one file input conversion at a time
- Multiple files are not allowed, it will provide error
- File size should less than 5MB
- Compression is support for only 6 image file extensions and only htese files should be uploaded
- After compression you can access the files through sharable link only
- Conversion Files can't be viewed due to security reasons. you need to download through sharable link
- The link is valid for 24 hours and automatically deleted after expiry
Options to access the data
- The response from the conversion will be of 2 forms
- If Successfull
- Compressed Filesize (#filesize): Give the final size of the image after compressed
- Download Link (#downloadlink): Sharable download link response through #downloadlink id attribute
- Delete Link (#deletelink): Sharable Delete link response through #deletelink id attribute
- Response (#response): Response will show a message - Converted
- If Failed
- Response (#response): Response will come based on giving invalid files, Mutiple files, File size issues, Conversional Extensions, Network issues and server issues
LIBRARIES
Image Compressor Library is made using JS, jQuery code developed by BMR ONLINE TOOLS
Refer, Download and use the Image Compressor library. Implement in your applications with our libraies using link or by downloading
Click on the below button and head directly to our Image Compressor Library Page
Try before your implement - BMR ONLINE TOOLS
Try our Image Compressor tools now from online tools before you implement using our library
This will give you a idea of Image Compressor tools and its information, algorithms, usage and more
Click on the below button and head directly to our Image Compressor tools
Implementation Code Using 1
Example 1
Example 2
Example 3
Example 4