#2 PHP Request (sending file directly to the API). Examples of implementation (PHP) #1 Simple PHP request (using GET and with a JSON response)Įcho $o->dest //URL of the optimized picture has been tested successfully with Drupal's ImageAPI Optimize (dev version) module and with the official Wordpress plugin Image Optimizer. You'll just have to replace the old API call by the webservice url, which works exactly the same way and everything will be fine! is 100% compatible with old non-working Yahoo webservice. 504 : internal error, could not fetch picture from remote servers.503 : internal error, could not reach remote servers for image optimization.502 : image provided too large (must be below 5MB).501 : internal error, cannot create a local copy.404 : unknown method or resource requested.It is one of the new Image compressor tools which can compress your photos up to 97 without compromising the quality. Works strictly with jpg, png, gif, tif and bmp files. Using Compress Image Low on storage But you don’t want to delete your precious images just compress them It is a simple app that compresses images in just 1 tap. 402 : impossible to fetch the image from $_FILES (usually a local URL).401 : impossible to fetch the image from URL (usually a local URL).Here is the list of the differents errors of the webservice : exif with the value true Default value is false.However, these data can be keeped while compression by specifying the following parameter in GET method : Since Feb 2017 (v.1.4.21), EXIF data are remove by default, reducing file size. Default value is 92įor having a good image quality, please remain above 90 To do so, just add the following parameter in GET method : Since July 2015 (v.1.4.2), you can now specify your optimization level for JPG compression. the error description (parameter error_long).the date when the file will be deleted from the server (parameter expires).the percentage of gain (parameter percent).the optimized file size (parameter dest_size).the original file size (parameter src_size).Image compression is very useful for images that are used for website, where image size has a large impact on page load time. the url of the optimized picture (parameter dest) Pi7 Image Compressor is an online image compression tool that uses the best method of optimization and lossless compression to reduce the size of JPEG, HEIC, and PNG images while maintaining the required level of quality.the source URL (if using GET or POST method) (parameter src). The output array contains several informations, such as : The webservice will return an array of informations about the compressed image (see below) API output For a standard call, with a JSON response, you just have to call this url and provide the image attribute like one of these options below :
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |