how to compressing image before upload in code igniter? - codeigniter

there is any trick for compressing an image in codeigniter while uploading image? so when image have 6MB memory, on the server that image just 2Mb.
thank you for your response :D

Related

NativeScript image size for upload

My NativeScript Angular app uploads an image to the backend which has a 10MB limit. How can I determine the size of the upload prior to issuing the http POST request? The uploaded image is base64 encoded, as such:
let imgBase64 = (this.imagesArray.getItem(0).imgsrc).toBase64String("jpeg");
Depending on what tool you are using for uploading your images there are different approaches. The easiest to me seems to use nativescript-background-http plugin. The plugin will cast property change events for currently uploaded, total upload and current status,
For example look at this POC app that shows you the progress of the uploaded files in bytes

How to resize images before uploading directly to s3

I'm using Ember on the frontend and Node/Express on the back end. I've got image uploading directly from my client to S3. My issue now is that the image sizes are huge (970 × 728 pixels (Natural: 3264 × 2448 pixels)) and I want to optimize the size. I've been able to do that using the canvas. But the resulting dataURI is also, very, very large. I could store it on my server, but that seems silly since then I'll have 1 large file sitting in s3 and another sitting in my server for every single image. I feel like the solution should be to upload the dataURI (in blob form) directly to s3 in the first place, but that's where I'm stumped. In order to draw the image in the canvas, I need the src url from s3. So how can I get the dataURI and save it to s3 without already having the original in s3 in the first place? Or should I be saving both versions in s3? Any advice on how to achieve this would be great. Thanks!
Browser support for this type of thing is limited. You could upload the large image to your server, use your server to resize the image, then upload the resized image from your server to s3 (making sure to delete the working copy). This is also good for hiding your AWS creds.
Another option is to use a service like: http://filepicker.io

how to optimize images when uploading in media manager for joomla 3?

when i upload 4MB images into media manager it takes the image full size with out optimize which makes my site to load long time, how to reduce image size automatically when uploading file images like in wordpress which optimize automatically.

Resizing images uploaded using GWT File upload

I have a mobile app where users can upload JPGs but I want to limit the size of the image before sending it to my GAE blobstore. I don't want to have to force a user to resize the image they want to upload but rather just do it on the fly. Anyone got a way to do this without distorting the image?
There is no straight forward way to do it and no third party library in gwt yet for this.
Option 1
The best you can try is for GWT wrappers over html5 apis . You can track this on another stackoverflow question Image resizing client-side with javascript before upload to the server
Option 2
Upload and process on server side before pushing to GAE blobstore.
If I am correct blobstores maximum file size is around 2Gb. And you can send around 1Mb of data in one request of GAE blobstore service.
There is an app called AppImage that divides the file into smaller pieces. For more info on that click the below link
Large Image Resizing for Google App Engine
This is just a thought : why do you want to upload it through GAE as you can directly upload it to blobstore unless it greater the 2Gb !!!!

Set Feature image in wordpress without upload

I have Images stored on s3 and calling from s3 in img tag. I can set feature image by inseting it to wp upload folder as in this thread
https://wordpress.stackexchange.com/questions/40301/how-do-i-set-a-featured-image-thumbnail-by-image-url-when-using-wp-insert-post
Now the problem is, how to set feature image without uploading it to wp folder. It should call the image from s3 and set it as feature.
Thanks a lot in advance.

Resources