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

(03-02-2023, 01:02 AM)luckmoshy Wrote:
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()); 

thanks sir, it's work .
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