Picture Cropper & uploader for WordPress (Media)

Note about support: all support requests about related to “Image cropper” are answered only in comments or on email.

I look forward to your comments on the work of the plugin

Plugin for wordpress and very easy to install

Plugin’s performance capabilities

The Image Cropper Plugin is created for a more convenient cropping of an image in a browser before sending it to the server.

  1. Plugin allows to crop large-size images that do not fit your screen.
  2. Plugin allows to set a necessary size of an image, e.g. 400×300
  3. It is possible to switch on or off multiloading of files, it allows to upload one image or several images at a time.
  4. It allows to send extra $_POST data to the server together with loading of an image.
  5. It is possible to drag files on the loading pushbutton.
  6. It allows to set a max size of an image by width or by height.
  7. Plugin allows to set your own styles at hover or focus

How work the other plug-ins download and cropping images?

  1. Upload photos to the server using the standard boot
  2. After uploading photos you can meet plugin that allows you to crope the image but
    it does not cut it on the fly(immediately) and finds coordinate X and Y, the width and
    height and sends them back to the server and the server that had received the data
    (x,y,width,height) loads the images into the memory, checks it, cut it and than saves and
    gives the results of the work to the browser.

How Image cropper works?

  1. Call the plug on the block, for example Upload image You
    can also drag image and throw them into the block if included the parameter drop: true
    when plugin is initializing.
  2. If the crop: true then after the image selection screen appears window with proposal to
    mark necessary area and cut it, I want to note that the image will not load, it has loaded
    into the browser from your computer and will not send.
  3. For your convenience it is made two fields for width and height, you can point width and
    height you need into them.
  4. Mark the area you need on the photo and click Cut than the selected area with photowith
    other parameters ( tipe, size…) will send as a view POST request to the address you had
    indicated , but if you will click Ignore the image will send without cutting, that is to say
    in the whole format.
  5. Server receives incoming data and stores your image in the format you want.

Additions:

– want you to pay attention if the image is very large it is reduced to the available size
of the window your web browser but the size of the image when it is cutting remains
unchanged it allows you to work with large formats, for example: 6000×4000.

– Also the system with the indication of the maximum size of the photo realized in the
plagin, for example, you want to limit your users with upload images no more than
1200px in width, than you should point the parameter maxWidth: 1200 plugin will check
the image size itself, and if it is more you specified, the image will automatically reduce
proportionally without losing of the quality, to 1200 in width.

Example:
you specified maxWidth: 1200 user loads the image in size200px width and height to 1600px
Eventually the image will reduce without losing of quality to the size of width 1200px
height: 874px, great, is not it? The same principle will work on maxHeigh, you can specify
two parameters at once and maxWidth and maxHeight.
Plugging s parameters:

v1.0 – Basic settings

  1. url: ’/upload.php’ – indicates the way the data will be send to
  2. name: ‘file’ – is responsible for the name of $_POST variable, e.g. php: $_POST[‘file’]
  3. multiple: true – permits or forbids loading of more than 1 file
  4. ratio: [‘1/1’, ‘4/3’] – can set the aspect ratio selection (You can change the cropping)
  5. data: – sends additional data with the cropping of an image, format json for example id: 1
  6. drop: true – permits drag&drop of files
  7. crop: true – allows cropping of images
  8. maxWidth: false – is responsible for a max size of an uploaded image, e.g. if you set 1200 and the original size is 1600, an image will shrink proportionally untill the size of 1200 by width.
  9. maxHeight: false – is responsible for a max size of an uploaded image, e.g. if you set 1200 and the original size is 1600, an image will shrink proportionally untill the size of 1200 by height.
  10. hoverClass: ‘hover’ – is the category of CSS styles that is activated when is hovered upon.
  11. focusClass: ‘focus’ – similarly to hoverClass but is actived when is focused at.
  12. onChange: – callback function is activated when you choose an image, it calls back 3 parameters, file – the file itself, ext – the file extention, render – base64 code of an image, it is used in the src attribute beside <img /> tag.
  13. onSubmit: – callback function is activared when you confirm cropping of an image, it calls back the same parameters as onChange file, ext and render
  14. onComplete: – callback function returnes the element – the very element upon which the plugin is summoned, ext – the file extention, response – the server response, render – base64 code of an image.

Leave a Reply

Your email address will not be published. Required fields are marked *