Admin area - Fly resize image

Update at 2017-12-22 07:58:21


On a typical website up to 30% is the image. Therefore, optimizing images with a reasonable size is a common practice for a web application.

Imagine, you upload an image of size "1000x1000" but your purpose for this photo is just "100x100" is enough, so you wasted up to 90% left.

CI Base provides an api that allows you to resize your images to the size you want, resizing images to be cached for future use.


First thing to note is that CI Base will only resize that image when it's on your site (can not be located on the 3rd site).



[width]: width (integer)
[height]: height (integer)
path/to/your/image: is the relative path of the image (from the root of the domain)
For example

You can also configure the path at admin/routes/web.php