Welcome Guest, Not a member yet? Register   Sign In
Help Image Manipulation Class
#3

(This post was last modified: 03-02-2023, 01:04 AM by luckmoshy.)

PHP Code:
$img $this->request->getFile('image');
        $newimage =str_ireplace(['.jpg','.png','jpeg'],'.webp'$img->getRandomName());

        \Config\Services::image()
            ->withFile($newimage)
            ->resize(1360768false'auto')
            ->convert(IMAGETYPE_WEBP)
            ->save(FCPATH '/img/');
        $img->move(WRITEPATH '../public/img/');

        dd($img->getName()); 
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply


Messages In This Thread
Help Image Manipulation Class - by randyshare - 03-01-2023, 06:27 PM
RE: Help Image Manipulation Class - by InsiteFX - 03-02-2023, 12:06 AM
RE: Help Image Manipulation Class - by luckmoshy - 03-02-2023, 01:02 AM
RE: Help Image Manipulation Class - by randyshare - 03-02-2023, 04:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB