2017 © Pedro Peláez
 

library timthumb

TimThumb is a simple, flexible, PHP script that resizes images.

image

gabrielgil/timthumb

TimThumb is a simple, flexible, PHP script that resizes images.

  • Thursday, July 17, 2014
  • by GabrielGil
  • Repository
  • 7 Watchers
  • 29 Stars
  • 2,509 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 53 Forks
  • 0 Open issues
  • 3 Versions
  • 5 % Grown

The README.md

TimThumb

TimThumb is a simple, flexible, PHP script that resizes images., (*1)

My intention is to have an updated repo which works with composer on all my known LAMP server configurations because the only timthumb repo on packagist is out of date (2.8.11) which doesn't works for me., (*2)

Installing with composer

To use this repo on you composer proyect, simply add an vcs repository pointing to this GitHub repo and require it on your composer.json file:, (*3)

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/GabrielGil/TimThumb"
        }
    ],
    "require": {
        "gabrielgil/timthumb": "2.*"
    }
}

A better way to use TimThumb

I think it's a good way of using timthumb, to store it on a non-public folder (Like the whole composer vendor folder) and then create your own resizer endpoint. If you use it with composer (as this repo is intended to), hide your vendor folder (Just an advice)., (*4)

How you create your own app structure depends on you, or on your team. If your desired resize endpoint points to a specific file, you can use this code there., (*5)


/* Redefine your with own defaults here. * This are just examples, no one is required. */ // Set the time the cache is cleaned (Since the image generation) to one month (2592000/60/60/24=30) define ('FILE_CACHE_MAX_FILE_AGE', 2592000); // Use the default system cache dir so your project's folder stays clean. define ('FILE_CACHE_DIRECTORY', sys_get_temp_dir()); // Quality set to 100% define ('DEFAULT_Q', 100); // Start timthumb. timthumb::start();

After this is set up, you can use all the parameters shown in the official documentation., (*6)

Documentation

You can also check the original documentation at binarymoon.uk, (*7)

The Versions

17/07 2014

dev-master

9999999-dev

TimThumb is a simple, flexible, PHP script that resizes images.

  Sources   Download

GPL-2.0

by Gabriel Gil

17/07 2014

2.8.14

2.8.14.0

TimThumb is a simple, flexible, PHP script that resizes images.

  Sources   Download

GPL-2.0

by Gabriel Gil

19/01 2014

2.8.13

2.8.13.0

TimThumb is a simple, flexible, PHP script that resizes images.

  Sources   Download

by Gabriel Gil