Image resize and creating thumb not working together! |
I am trying to upload an image to my server. After uploading, I want following actions:
1. If the image is larger than 600Kb, I want to reduce the image quality by 60% 2. If the image is larger than 300Kb, I want to reduce the image quality by 70% 3. After that, want to create thumb of the image. But these are not working together. Here is my code: Code: if(!$this->upload->do_upload('img')){ Thanks in advance for your help. ![]() (07-27-2018, 05:48 AM)php_rocs Wrote: @webdevron, No there is no error. Just not working all together.
You did not say where this code is! I'am guessing that it's in a library
because you are using the CI Controller object. Where is this code located? What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(07-27-2018, 09:28 AM)InsiteFX Wrote: You did not say where this code is! I'am guessing that it's in a library This is the snippet of a function in main controller. This function is uploading image to my server. After uploading, I want to Reduce its size and Create a thumbnail
@webdevron,
Take a look at https://AmpProject.org because image dimensions are not mandatory as they can fit inside any fixed or responsive parent container. https://johns-jokes.cf/amp?app=2 Notice the web-page source script, about a dozen CSS lines are required to format the image. And not forgetting that images are stored freely using the Google CDN Cache ![]() |
Welcome Guest, Not a member yet? Register Sign In |