PHP code example of soysaltan / imagify

1. Go to this page and download the library: Download soysaltan/imagify library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

soysaltan / imagify example snippets

javascript
$('#test").imagify({
            onInit: function (elm) {
             	elm.css("background-color","red");  
});
javascript
$('#test").imagify({
            onError: function (errorId) {
             if (errorId==$.fn.imagify.ALLOWED_EXT_ERROR) {
			 	alert('This extension is not supported !')
			 }
});
javascript
$('#test").imagify({
            onDimensionError: function (file) {
			 	alert('Dimension error !')
});
javascript
$('#test").imagify({
			maxWidth:  2000,
			minWidth:  1,
 		   maxHeight:  3000,
			minHeight:  1,
            onDimensionError: function (file) {
			 	alert('Dimension error !')
});