CodeIgniter Forums
Thumbnails Module - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Addins (https://forum.codeigniter.com/forumdisplay.php?fid=34)
+--- Thread: Thumbnails Module (/showthread.php?tid=74142)



Thumbnails Module - MGatner - 07-29-2019

Hi all- I'm working on a much larger file management module, but I found myself writing a pretty complete  thumbnail function for it that I deemed worth splitting out into its own module. It's lightweight but has the advantage that it scans other modules (and \App) for more supported thumbnail extension support. I will be adding more extensions shortly.

Tatter/Thumbnails - Modular thumbnail generation, for CodeIgniter 4

Basic usage:
1. Install with Composer: > composer require tatter/thumbnails
2. Load the service: $thumbnails = service('thumbnails');
3. Create your first thumbnail: $thumbnails->create('bigfile.jpg', 'thumbnail.jpg');

Use the config file to define parameters, or change them on-the-fly:
* $thumbnails->setImageType(IMAGETYPE_PNG);
* $thumbnails->width(120);



Thanks for reading! I'm always glad for feedback and suggestions, feel free to leave a comment here or check out the repo at https://github.com/tattersoftware/codeigniter4-thumbnails


RE: Thumbnails Module - albertleao - 07-29-2019

Tests mate! Smile


RE: Thumbnails Module - MGatner - 07-29-2019

Wink thanks for the persistent reminders! I actually had a very helpful chat with kilishan last weekend on CI4 module testing and I think I finally have my head around it. I’m working on adding tests to all the modules, but I needed this package up before those would be ready to roll out. Never fear, they are on the way!
You may have notice I’ve reorganized my directory structures off your league/skeleton recommendation. I’ll be an honest dev one day ^^


RE: Thumbnails Module - albertleao - 07-30-2019

Here's another package that might inspire you for tests for this library.

https://github.com/Intervention/image/tree/master/tests


RE: Thumbnails Module - MGatner - 09-05-2019

@albertleao https://forum.codeigniter.com/thread-74284.html


RE: Thumbnails Module - MGatner - 10-21-2020

Quick note to say that Thumbnails has been revamped! Lots of bugs fixed, the library made easier to use. This is part of a larger set of changes to the Files suite - read more updates there.


RE: Thumbnails Module - nc03061981 - 10-24-2020

Thanks @MGatner