HazzardWeb supports this item


This author's response time can be up to 1 business day.

75 comments found.

does this script have size check, error report and status?

Your demo is distorting the images.

Hi, i want to integrate with CodeIgniter, but i have some problems with upload.php. Show me this message: Invalid JSON response.

Hi, I put the image in the database but I get error “Invalid JSON response”, i use the callbacks on the server side, in the “upload_complete”.

'upload_complete' => function($image, $instance) {
        // Here you can save the image to database
        // using $image->name to get the image name
$link->query("INSERT INTO `images` (image_name, position, foreign_id) VALUES ('".$image->name."', '".(time())."', '".'999'."')");


Hi, I solved with the database. Chrome browser I get the error “Webcam Error: PermissionDeniedError” Firefox is OK. Thank you

Starting with version 47, Chrome requires a secure connection (SSL) in order to use the Webcam



i have this error

Ajax upload error.


Hi, have you tried to look in the browser Network tab to see what response you get from the server ? Try like this http://docs.hazzardweb.com/imageselect/1.4/debugging

camera not working in chrome please help

Starting with version 47, Chrome requires a secure connection (SSL) in order to use the Webcam.


paracom Purchased

Hi, I have been using your script for quite a while now, can you confirm if you run your script on a website with an ssl certificate ie https:// then will the webcam work in Chrome version 47 and later.

hi, nice work. my question is if we can to integrat with codeigniter ?

Hi, it should work as long as you know a bit of PHP, but I don’t have a guide for it.

However I have a similar script that has support for CodeIgniter 3 https://demo.hazzardweb.com/filepicker/

i have a script and i want to integrate webcam … in codeigniter and i dont know how can do this…. if you can make that for me …..... i can pay you for your script and your supporting…. thank you

hi, buy this code yesterday. input my own website. everything is a ok but cant crop picture and no error. please support me…

So what’s the problem then? Can you send me a link to your website?

i can send but the code in my member area..please give me your email…

Hello… I just bought your script, and I have everything working, except the “save” part… I can upload, and crop, but after cropping, when you hit the “save” button, it doesn’t save the cropped picture in the top right corner like in your preview.

Obviously, I’m missing something… I do not want to save the image to my MSQL server, if I don’t have to. I just want users to be able to crop the image, and then click on the cropped image to be able to download and save to their phones and computers. That a way, they can then upload their cropped images from their phones and or computers into their avatar profiles through our upload feature.

lol do you understand what I mean? XD Thanks again, Hazzard!

Never mind! I got it to work now! :) Looks and works great—thanks! Good job, my friend! Quick question, though, is there a way to fix the crop size to 260px by 260px? Also, is there a way users can click on the cropped image, and then have it automatically download for them? Thanks! :)

No response? Meh, this script is useless to me then.

Hi, sorry for the late reply. You can specify the crop_max_width and crop_max_height with force_crop enabled to crop the image http://docs.hazzardweb.com/imageselect/1.4/optionsphp#force_crop

If you want to download the image you’ll have to write a script that reads the file from disk and outputs it to the user.


mczyz Purchased

Thank you for creating this – it works great! Just had a question on the upload directory. Is there an easy way change the upload directory if I want these files uploaded outside of the imageselect directory? Not seeing how to set this. Thanks!


mczyz Purchased

Sorry had another question. Tried to figure out how to set the crop selection (want a rectangle instead of square). I’ve read the docs and jcrop manual but everything I’ve tried gives me a square. Tried adjusting the w and h values too but nothing changes. I’m in the imgSelect.js file: crop: { aspectRatio: 150/100, minSize: null, maxSize: null, setSelect: [0,0,150,100] any ideas? Thanks again!


mczyz Purchased


crop: { aspectRatio: 150/100, minSize: null, maxSize: null, setSelect: [0,0,150,100]

Hi, set it like this http://prntscr.com/bpyx49 in the uploadComplete callback.

Hi i want to add watermark it is possible you can add

Hi, this is not a feature of ImageSelect. But it can be done in the upload_complete callback. Here is an example http://php.net/manual/en/image.examples-watermark.php

it is possible you can add this coding than i will purchase

Unfortunately I’m not available for freelance work.

But I do have another script https://demo.hazzardweb.com/filepicker2/ that has a guide for inserting watermarks http://docs.hazzardweb.com/filepicker/2.0/howto#insert-watermark

please can it be integrated into a form

What do you mean by that ? To use the script you just have to add some HTML http://docs.hazzardweb.com/imageselect/1.4/installation#usage

Is it possible for the Crop function a fixed width and height to specify?

I have installed your app, and it works fine, really happy with it. I am using the modal example on my site. The one problem I have is passing a php variable from my index.php to renames the file to a userId. I tried the code example in the docs but just get error messages. Can you give me some guidance on getting this sorted out please?

I take it I should insert this: $image->name = 'custom_name.'.$image->type; within the ‘before_upload’ callback, but how do I replace ‘custom_name’ with the session variable? I tried this (and a few other variations), but get a permanent ‘Loading’ message and the filename is simply: <?php echo session['userid'] ?>.jpg

In your main file start the session and set $_SESSION['user_id'] = $usercode;

Then in upload.php start the session and access the user id:

$image->name = $_SESSION['user_id'].'.'.$image->type;

Perfect thanks. It was the syntax in upload.php where I was falling down! Always something simple. Thanks for the great and timely support!

I would like to refresh the uploaded image on page. Can you tell me the best location to call/put some js code after the upload has finished? I’m guessing in imgSelect.js. I tried a few things but it seemed to affect the resulting image display, it changed the displayed image size. Thanks again!