How Can We Help You?

Compressing

Picsmize image compressing API minimize image size without affecting its original quality with achieving on average 60% of savings without any impact on the image. The Picsmize Image API gives you the option of selecting a compressing level for various instances. Below, you will find the Picsmize API’s full description of various compressing level : Low, Medium and High. If you’ve tried to upload or use a massive high-resolution image file, you know why image compression is so important. Image formats that use compression make it easy to save images across devices, share or load. Before you convert your files, know what you’re working with in terms of image quality and compression.

Supported image formats:

  • JPEG
  • JPG
  • PNG
  • WEBP
Low

To utilize the Low level compression, you must first set a "level" : "low" in the compress hash.

<?php

/**
* Instantiate new `$picsmize` by calling a constructor
*/

$picsmize = new Picsmize('your-api-key');

/**
* Provide a publicly available image URL with fetch(string) method,
* compress the image, set compress level to "low"
*/

$picsmize
->fetch('https://www.example.com/image.jpg')
->compress(Picsmize::COMPRESS_LOW)
->toJSON(function ($response) {
if ($response['status'] == false) {
throw new Exception($response);
}

/**
* You'll find the full JSON metadata array within the `$response` variable.
* Remember to always check if the `status` property is set to `true`.
*/

if ($response['status'] == true) {
print ($response['output']['src']);
} else {
print ($response['message']);
}
});
curl -X POST \
https://api.picsmize.com/image/process \
-H "apikey: your-api-key" \
-H "content-type: application/json" \
-d '{
"img_url": "https://www.example.com/image.jpg",
"process": {
"compress": {
"level": "low"
}
}
}'

Comming Soon3..

Comming Soon4..

Comming Soon5..

Compress The Photo
Images Size Reducer
Resizing Of Image
Medium

To utilize the Medium level compression, you must first set a "level" : "medium" in the compress hash.

<?php

/**
* Instantiate new `$picsmize` by calling a constructor
*/

$picsmize = new Picsmize('your-api-key');

/**
* Provide a publicly available image URL with fetch(string) method,
* compress the image, set compress level to "medium"
*/

$picsmize
->fetch('https://www.example.com/image.jpg')
->compress(Picsmize::COMPRESS_MEDIUM)
->toJSON(function ($response) {
if ($response['status'] == false) {
throw new Exception($response);
}

/**
* You'll find the full JSON metadata array within the `$response` variable.
* Remember to always check if the `status` property is set to `true`.
*/

if ($response['status'] == true) {
print ($response['output']['src']);
} else {
print ($response['message']);
}
});
curl -X POST \
https://api.picsmize.com/image/process \
-H "apikey: your-api-key" \
-H "content-type: application/json" \
-d '{
"img_url": "https://www.example.com/image.jpg",
"process": {
"compress": {
"level": "medium"
}
}
}'

Comming Soon3..

Comming Soon4..

Comming Soon5..

Resizing An Image Online
Resizing Pictures
Compress A Png
High

To utilize the High level compression, you must first set a "level" : "high" in the compress hash.

<?php

/**
* Instantiate new `$picsmize` by calling a constructor
*/

$picsmize = new Picsmize('your-api-key');

/**
* Provide a publicly available image URL with fetch(string) method,
* compress the image, set compress level to "high"
*/

$picsmize
->fetch('https://www.example.com/image.jpg')
->compress(Picsmize::COMPRESS_HIGH)
->toJSON(function ($response) {
if ($response['status'] == false) {
throw new Exception($response);
}

/**
* You'll find the full JSON metadata array within the `$response` variable.
* Remember to always check if the `status` property is set to `true`.
*/

if ($response['status'] == true) {
print ($response['output']['src']);
} else {
print ($response['message']);
}
});
curl -X POST \
https://api.picsmize.com/image/process \
-H "apikey: your-api-key" \
-H "content-type: application/json" \
-d '{
"img_url": "https://www.example.com/image.jpg",
"process": {
"compress": {
"level": "high"
}
}
}'

Comming Soon3..

Comming Soon4..

Comming Soon5..

Compress Jpeg
Image Online Resize
Compressor Photo