PHPackages                             soysaltan/imagify - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. soysaltan/imagify

ActiveLibrary[Image &amp; Media](/categories/media)

soysaltan/imagify
=================

Imagify image upload simplifier

1.2(6y ago)15JavaScript

Since Jul 28Pushed 6y ago1 watchersCompare

[ Source](https://github.com/soysaltan/Imagify)[ Packagist](https://packagist.org/packages/soysaltan/imagify)[ RSS](/packages/soysaltan-imagify/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)DependenciesVersions (4)Used By (0)

Imagify
=======

[](#imagify)

Imagify simplifies your image upload process, does not tire you.

**Installation**

Add JQuery and Imagify source files. (best practice)

```

```

```

```

or

```
composer require soysaltan/imagify
```

... and you are ready to go.

```

```

```
$("#test").imagify();
```

EVENTS
======

[](#events)

**onInit** (*elm*):
-------------------

[](#oninit-elm)

This event runs the first time the imafigy element is called and and returns **the rendered element** itself.

*Example* :

- Background color becomes red when the div element is rendered with imagify.

```

```

```
$('#test").imagify({
            onInit: function (elm) {
             	elm.css("background-color","red");
});
```

onSuccess (*elm*,*source*):
---------------------------

[](#onsuccess-elmsource)

The rendered element has been attributed with **data-src** key

*Example* :

- Log the selected image's base64 code.

```
$('#test").imagify({
            onSuccess: function (elm, source) {
             console.log( $("#test").attr("data-src") );
});
```

elm : The rendered element source : Base64 code of the selected image

onError (*errorId*):
--------------------

[](#onerror-errorid)

Returns the *errorId* information for the error.

*Example* :

- Background color becomes red when the div element is rendered with imagify.

```
$('#test").imagify({
            onError: function (errorId) {
             if (errorId==$.fn.imagify.ALLOWED_EXT_ERROR) {
			 	alert('This extension is not supported !')
			 }
});
```

errorId : The error id of the error information. It could be :

```
MAX_SIZE_ERROR = 1;
DIMENSION_ERROR = 2;
MIN_SIZE_ERROR = 3;
ALLOWED_EXT_ERROR = 4;
```

onDimensionError:
-----------------

[](#ondimensionerror)

Fires when image dimension error occurred.

*Example* :

- Fire the dimension error when the specified attributes in the html.

```

```

```
$('#test").imagify({
            onDimensionError: function (file) {
			 	alert('Dimension error !')
});
```

or you can specify the attributes in the javascript side.Dimensions in px.

```
$('#test").imagify({
			maxWidth:  2000,
			minWidth:  1,
 		   maxHeight:  3000,
			minHeight:  1,
            onDimensionError: function (file) {
			 	alert('Dimension error !')
});
```

file : The selected image file element.

onMinSizeError:
---------------

[](#onminsizeerror)

Fires when minimum image size error occurred.

*Example* :

- Fire the minimum image size error when the specified attributes in the html.

```

```

```
$('#test").imagify({
            onMinSizeError: function (file) {
			 	alert('Min size error !')
});
```

onMaxSizeError:
---------------

[](#onmaxsizeerror)

Fires when maximum image size error occurred.

*Example* :

- Fire the maximum size error when the specified attributes in the html.

```

```

```
$('#test").imagify({
            onMaxSizeError: function (file) {
			 	alert('Max size error !')
});
```

onAllowedExtError:
------------------

[](#onallowedexterror)

Fires when image extension error occurred.

*Example* :

- Fire the image extension error when the specified attributes in the html.

```

```

```
$('#test").imagify({
            onAllowedExtError: function (file) {
			 	alert('This extension is not allowed. Just available for Png, Jpg or Jpeg !')
});
```

### Default options :

[](#default-options--)

```
style: 'border: 1px solid #ccc;',
minSize: 0, // MB
maxSize: 1, // MB
maxSizeErrorMessage: 'Imagify : Max size error !',
minSizeErrorMessage: 'Imagify : Min size error !',

maxWidth: 2000, // px
minWidth: 1, // px
maxHeight: 3000, //px
minHeight: 1, //px
dimensionErrorMessage: 'Imagify : Dimension error',

allowedExt: elm.attr('data-allowed-file-extensions') || 'jpg jpeg png',
allowedExtErrorMessage: 'Imagify : Not allowed image extension !',

showThumb: true, // show preview image
feedElement: true, // add the 'data-src' attribute to the element
chooseText: "Choose Image",
changeFileText: "Change Image",
showImageLabel: true
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2482d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f6d9a01a2e600f584111a562f8b3b51fe0e10b03d036c8f573fd45a53e44a947?d=identicon)[soysaltan](/maintainers/soysaltan)

---

Top Contributors

[![paramientos](https://avatars.githubusercontent.com/u/4548213?v=4)](https://github.com/paramientos "paramientos (21 commits)")

---

Tags

htmlimageimage-manipulationjqueryjquery-pluginupload

### Embed Badge

![Health badge](/badges/soysaltan-imagify/health.svg)

```
[![Health](https://phpackages.com/badges/soysaltan-imagify/health.svg)](https://phpackages.com/packages/soysaltan-imagify)
```

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[char0n/ffmpeg-php

PHP wrapper for FFmpeg application

495225.1k1](/packages/char0n-ffmpeg-php)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
