Crop Image to a Specific Ratio Js and Upload to Php Script
In this post you lot can find how to use Cropper.js library for Crop epitome earlier uploading of epitome to the server using PHP script. In this tutorial you can learn simple epitome ingather while uploading of image using Cropper.js with PHP. If you are looking of tutorial on ingather and save image using jQuery and PHP. And then you accept come up on the right web page, considering in this blog nosotros accept step by step describe, how to employ Cropper.js with PHP for crop image before upload paradigm to the server. In this tutorial, we have use ajax for image upload and for crop, we accept utilise jQuery and PHP.
In one of the our previous tutorial on prototype cropping and uploading to server, and in this tutorial, we have use Croppie.js library of Ingather image at the time of uploading of image. Simply at that time many viewers has requested us to publish tutorial on how to crop image using Cropper.js library at the time of uploading of prototype using PHP. For that request nosotros have publish this tutorial and in this we have implement how to use Cropper.js library for ingather image dynamically while uploading of images. By using Cropper.js library you can practise live crop of image, resize of image at the time of upload of image. In this post we have employ Cropper.js jQuery plugin for Ingather and Resize image, and for upload image to server here we have utilize Ajax with PHP.
There are many benefits of Cropping of image earlier upload image to server.
- Ingather image is not bad feature for server space optimization.
- Crop prototype will resize epitome equally per required size while uploading on the server.
- Crop epitome will reduce image size and optimize image before uploading to the server.
- Crop paradigm will upload prototype with our required width and height.
- Crop image volition reduce web page size and information technology volition reduce loading fourth dimension for display epitome.
- Crop image will optimize prototype data before uploaded to the server.
- Crop epitome will optimize paradigm so it will save our bandwidth
- Crop image will make thumbnail of uploaded image
Cropper.js is unproblematic jQuery plugin which has been used for image crop with extra functionality like live preview of prototype at the time of uploading of image. Past using this plugin you tin can go the functionality similar moving of paradigm, zooming of image, rotating of image, and this plugin is fully responsive and information technology is mobile friendly. Crop image functionality, we can use in edit profile pictures, creating phone albums etc which we have upload to the server. Lastly, In this tutorial we will integrate Cropper.js with PHP script for optimize image by croping earlier paradigm uploaded to the server. So In this tutorial, we will integrate Cropper.js for crop paradigm while uploading of paradigm using PHP script with Ajax.
Source Code
index.php
<?php //index.php ?> <!DOCTYPE html> <html> <head> <championship>Crop Image Before Upload using CropperJS with PHP</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/three.three.6/css/bootstrap.min.css" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/two.2.0/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/iii.3.vi/js/bootstrap.min.js"></script> <link rel="stylesheet" href="https://unpkg.com/dropzone/dist/dropzone.css" /> <link href="https://unpkg.com/cropperjs/dist/cropper.css" rel="stylesheet"/> <script src="https://unpkg.com/dropzone"></script> <script src="https://unpkg.com/cropperjs"></script> <mode> .image_area { position: relative; } img { brandish: block; max-width: 100%; } .preview { overflow: hidden; width: 160px; height: 160px; margin: 10px; border: 1px solid red; } .modal-lg{ max-width: 1000px !important; } .overlay { position: accented; bottom: 10px; left: 0; correct: 0; background-colour: rgba(255, 255, 255, 0.5); overflow: hidden; height: 0; transition: .5s ease; width: 100%; } .image_area:hover .overlay { acme: 50%; cursor: pointer; } .text { color: #333; font-size: 20px; position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); -ms-transform: translate(-fifty%, -50%); transform: translate(-fifty%, -50%); text-marshal: center; } </style> </head> <body> <div class="container" align="eye"> <br /> <h3 align="eye">Crop Image Earlier Upload using CropperJS with PHP</h3> <br /> <div form="row"> <div class="col-physician-4"> </div> <div grade="col-doctor-iv"> <div course="image_area"> <form method="post"> <label for="upload_image"> <img src="upload/user.png" id="uploaded_image" class="img-responsive img-circle" /> <div form="overlay"> <div class="text">Click to Change Profile Paradigm</div> </div> <input type="file" proper noun="image" course="epitome" id="upload_image" manner="display:none" /> </label> </form> </div> </div> <div class="modal fade" id="modal" tabindex="-1" office="dialog" aria-labelledby="modalLabel" aria-hidden="true"> <div grade="modal-dialog modal-lg" part="document"> <div course="modal-content"> <div class="modal-header"> <h5 class="modal-title">Ingather Prototype Before Upload</h5> <button type="button" class="shut" data-dismiss="modal" aria-characterization="Shut"> <bridge aria-hidden="true">×</span> </push button> </div> <div class="modal-torso"> <div class="img-container"> <div form="row"> <div grade="col-md-8"> <img src="" id="sample_image" /> </div> <div class="col-md-4"> <div form="preview"></div> </div> </div> </div> </div> <div class="modal-footer"> <push button type="button" id="crop" class="btn btn-main">Crop</button> <push type="button" form="btn btn-secondary" data-dismiss="modal">Cancel</button> </div> </div> </div> </div> </div> </torso> </html> <script> $(certificate).fix(function(){ var $modal = $('#modal'); var prototype = document.getElementById('sample_image'); var cropper; $('#upload_image').change(function(event){ var files = upshot.target.files; var done = office(url){ paradigm.src = url; $modal.modal('testify'); }; if(files && files.length > 0) { reader = new FileReader(); reader.onload = function(event) { done(reader.upshot); }; reader.readAsDataURL(files[0]); } }); $modal.on('shown.bs.modal', function() { cropper = new Cropper(image, { aspectRatio: 1, viewMode: iii, preview:'.preview' }); }).on('hidden.bs.modal', function(){ cropper.destroy(); cropper = null; }); $('#crop').click(function(){ canvas = cropper.getCroppedCanvas({ width:400, tiptop:400 }); sail.toBlob(office(hulk){ url = URL.createObjectURL(blob); var reader = new FileReader(); reader.readAsDataURL(blob); reader.onloadend = office(){ var base64data = reader.result; $.ajax({ url:'upload.php', method:'POST', data:{paradigm:base64data}, success:function(data) { $modal.modal('hibernate'); $('#uploaded_image').attr('src', data); } }); }; }); }); }); </script>
upload.php
<?php //upload.php if(isset($_POST['paradigm'])) { $data = $_POST['image']; ////data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAC0CAIAAAA1l+0PAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAABk3SURBVHhe7Z1/iF5VesfnjyJM/3hLWJyhL13WQWGlKETYLVKEsF0WFTrSTZBaRIpdVrZZ2SZl0W4bdV3sgtsqMSC1RurWZNsSXImQqFXYCOLG/CErWUhapdHJTDNm4saEDJhJ0qTfc+/JzZ1zfz3Puee+73tevx++SJz3nvOee997vu9znvvc+05cIoSQSKBhEUKigYZFCIkGGhYhJBpoWISQaKBhEUKigYZFCIkGGhYhJBpoWISQaKBhEUKigYZFCIkGGhYhJBpoWIS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_name = 'upload/' . time() . '.png'; file_put_contents($image_name, $data); echo $image_name; } ?>
Source: https://www.webslesson.info/2020/08/php-crop-image-while-uploading-with-cropper-js.html