Tag : Image


Laravel 5 - Image Gallery CRUD example from scratch

In this posts, i am going to share with you how to make bootstrap photo gallery with validation and fancybox in laravel 5 application. As we know, we almost require to develop image gallery module for user. Photo album will help to easily upload image and remove that with proper validation. So we always want to built good bootstrap layout with image gallery. However in this example, we will implement photo gallery from scratch with good layout that way you can simply built it with your project. In this example i created "image_gallery" table with main 'title' and 'image' columns. I created o.....

By Hardik Savani | April 15, 2017 | | 11657 Viewer | Category : Laravel Bootstrap jQuery
READ MORE

How to upload image with validation in PHP Codeigniter?

In this post, we learn step by step codeigniter image uploading from scratch. Image Upload functionality is a very basic require to all most back-end project for like user profile picture upload, product image upload, category photo upload etc. So in this tutorial, i am going to share with you small example of image uploading with validation from scratch. So you can simply identify how upload image or file with validation, we can simply use validation for mime type, file max size etc. In this example i will use <strong class="path">"upload"</strong> library of Codeigniter. codeigniter provide.....

By Hardik Savani | March 18, 2017 | | 1639 Viewer | Category : PHP Codeigniter
READ MORE

Ajax Image Upload Example with Validation in PHP Laravel Framework

Today, I am going to show you How to image or file upload using jquery Ajax in our Laravel application. In this tutorial i explain step by step example code of ajax image upload using jquery form JS. As you know today, we have basic feature image or file uploading(<a href="http://itsolutionstuff.com/post/laravel-53-image-upload-with-validation-exampleexample.html" target="_blank">Laravel 5.3 Image Upload with Validation example</a>) on our PHP Project Or Laravel application. Client always want to store image for profile, products, items, users etc. Laravel provide very simple way to store tha.....

By Hardik Savani | December 28, 2016 | | 33039 Viewer | Category : PHP Laravel Javascript Bootstrap jQuery MySql Ajax
READ MORE

AngularJS - Display Default image if original image does not exists with example

We always require to check image is exists or not in given path, If not exists then we have to set default image. If we work on PHP or any framework then we check condition or something else for image exists of not to check But If you are working on AngularJS framework then we can do it using "directive". AngularJS directive through we can simple check image is exists or not on the given url path. In this example i use ng-src and err-src attribute to manage image, directive will check ng-src url image is exists or not, if not then it will set err-src image as default. So, I give you very bas.....

By Hardik Savani | October 18, 2016 | | 1548 Viewer | Category : Javascript HTML jQuery AngularJS
READ MORE

Laravel 5.3 Image Upload with Validation example

Laravel is very popular PHP framework today and Laravel 5.3 released few days ago. There are several changes and enhancement on Laravel 5.3 version. So, Today i want to share with you how to image uploading in Laravel 5.3 with validation. If you are beginners then you can do that simply by following few step. Laravel 5.3 provide very simple way to create file uploading with proper validation like max file size 2MB, valid file extension like jpeg,png,jpg,gif or svg etc. So you can easily also implement this on your laravel 5.3 application. I give you very easy and simple example that way you.....

By Hardik Savani | September 2, 2016 | | 97149 Viewer | Category : PHP Laravel
READ MORE

Laravel 5 - Multiple Images Uploading using dropzone.js example with demo

We always have to do image uploading in our laravel application, In this post i give you example code of how to upload multiple images using dropzone.js. dropzone.js through we can make image uploading very simply and with best layout. Dropzone.js is a jquery plugin, dropzone.js through we can select one by one image and also with preview. After choose image from browse we can see preview of image. dropzone.js also provide filter like we can make validation for max upload, specific image or file extension etc. In this example i create two route, one for display view and another for store ima.....

By Hardik Savani | August 11, 2016 | | 40051 Viewer | Category : Laravel Bootstrap jQuery
READ MORE

Jquery - Display a loading gif image before a image loads using Eager ImageLoader plugin

Eager ImageLoader plugs give us lazy loading before image loads, in this example you can load your gif image that you want before main image load. In this example i use eager-image-loader plugin. As you can see bellow preview that before image load. so first you have to give path of gif image "./upload/loading.gif" instead of your gif image path. If you want to get this image then you can get from demo. <strong>Preview:</strong> <img src="/upload/image-upload.png" style="width:100%;border:2px solid red" /> <strong>Example:</strong> <pre class="prettyprint lang-html"> <html lang="en">.....

By Hardik Savani | July 8, 2016 | | 2097 Viewer | Category : Javascript jQuery
READ MORE

How to get folder path from file path in PHP?

Sometimes, we require to get directory path from Image path or file url in our PHP website or any PHP framework website at that time we can get folder name using php pre-define function dirname. If you ever use this function then you can see as bellow example how it's works. I have one image url like, i want to just get folder path then you can get folder path like this way : <strong>Example:</strong> <pre class="prettyprint lang-php"> dirname('http://localhost:8000/upload/images/test.jpg'); </pre>

By Hardik Savani | July 4, 2016 | | 537 Viewer | Category : PHP
READ MORE

How to get filename without extension in PHP?

If you need to get just filename from url withour file extension then you can get that using basename() php function. In bellow example i give you how to get image name without extension. first we need to get extension of given filename url and then basename() through we can remove that extension like as i did bellow: <strong>Example:</strong> <pre class="prettyprint lang-php"> $imagePath = "/home/hd/html/test.jpg"; $ext = pathinfo($imagePath, PATHINFO_EXTENSION); <br/> $file = basename($imagePath,".".$ext); print_r($file); </pre>

By Hardik Savani | May 26, 2016 | | 761 Viewer | Category : PHP
READ MORE

Display preview selected image in input type file using JQuery

Sometimes we need to show preview of image before image upload. I mean when user will select new image from input="file" then it will display preview of image. In this example you can see before upload it will display preview using jquery. <strong>Example:</strong> <pre class="prettyprint lang-html"> <html lang="en"> <head> <title>Change image on select new image from file input</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script> </head> <body> <br/> <input type="file" name="file" id="profile-im.....

By Hardik Savani | May 16, 2016 | | 13982 Viewer | Category : Javascript HTML jQuery
READ MORE

    How to use elasticsearch from scratch in laravel 5?

    How to use elasticsearch from scratch in laravel 5?

    Open Post

    Laravel 5 create Custom Validation Rule example.

    Laravel 5 create Custom Validation Rule example.

    Open Post

    PHP - autocomplete websites with domain and logo using clearbit API

    PHP - autocomplete websites with domain and logo using clearbit API

    Open Post

    Laravel 5.3 - whereDate(), whereMonth(), whereDay() and whereYear() examples.

    Laravel 5.3 - whereDate(), whereMonth(), whereDay() and whereYear() examples.

    Open Post

    How to use login throttle in laravel 5?

    How to use login throttle in laravel 5?

    Open Post

    Laravel 5.3 - Customize pagination templates example from scratch

    Laravel 5.3 - Customize pagination templates example from scratch

    Open Post