Welcome Guest, Not a member yet? Register   Sign In
Reduce quality in Image Manipulation Class
#1

Hello
Is it possible to set quality when Image Manipulation Class with ImageMagick or GD ?
It is possible in CI3 but it does not look possible CI4 Confused
Reply
#2

(This post was last modified: 08-27-2019, 05:51 PM by php_rocs.)

@paul,

You can specify which image library you wish to use by setting the $config['image_library'] field (https://codeigniter.com/user_guide/libra...g-an-image).  This is for CI3.

Just don't forget that you must have the extension installed with PHP.
Reply
#3

@paul you do it when you save the image: `public function save(string $target = null, int $quality = 90)`
Worth noting though that it is only supported for JPEGs.

Ref. https://github.com/codeigniter4/CodeIgni...r.php#L318
Reply
#4

Thx MGatner

That is what i wanted

maybe it should be added to the documentation
Reply
Reply




Theme © iAndrew 2016 - Forum software by © MyBB