PHPackages                             crachecode/tajine - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. crachecode/tajine

ActiveProject[Caching](/categories/caching)

crachecode/tajine
=================

image thumbnail generator

v1.0.1(8y ago)0581MITPHPPHP &gt;=5.6.0

Since Nov 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/crachecode/tajine)[ Packagist](https://packagist.org/packages/crachecode/tajine)[ Docs](https://github.com/crachecode/tajine)[ RSS](/packages/crachecode-tajine/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (1)

Tajine
======

[](#tajine)

Tajine is an images and thumbnails generator suitable for any web project. It is based on the [Intervention Image](https://github.com/Intervention/image) library.

Features
--------

[](#features)

Tajine allows you to resize images at any dimensions, in a flexible way, and cache the generated images. These images can be called directly at a specific size via HTTP by passing parameters in the URL. This URL can be used in a HTML file as the `src` parameter of an `img` tag e.g. (or by a CSS rule-set).

Requirements
------------

[](#requirements)

Tajine requires PHP 5.6 or higher. Its cache functionality can make use of Apache mod\_rewrite, it also allows simpler image URLs, but Apache should not be mandatory. Tajine has not been tested with any other HTTP server though.

Installation
------------

[](#installation)

1. Clone the repository using Git :
    `git clone https://github.com/crachecode/tajine.git`
2. Enter the new directory :
    `cd tajine`
3. Install dependencies using Composer :
    `composer update`
4. Allow writing on the cache directory :
    `chmod 777 public/img/cache`
5. Define either the `tajine` or `tajine/public` directory as your VirtualHost root.

Using Tajine
------------

[](#using-tajine)

Original Images should be placed in `tajine/public/img/originals` directory.

Images at any dimension can then be accessed via HTTP following this URL syntax :

`{name}.{width}x{height}.{method}.{quality}.{upsize}.{extension}`

e.g. :

- `image.1280x1024.basic.90.false.jpg` (width = 1280px, height = 1024px, basic method, jpg quality 90, no upsizing)
- `image.1280x.false.jpg` (width = 1280px, no height specified, no upsizing)
- `image.x1024.jpg` (height = 1024px, no width specified)

### Parameters

[](#parameters)

namevalue typedescriptiondefault`name`stringfilename as accessible in `tajine/public/img/originals` without extensionn/a, required`extension`stringextension of filename as accessible in `tajine/public/img/originals`n/a, required`width`integerthumbnail width (in pixel)n/a`height`integerthumbnail height (in pixel)n/a`method``basic`, `fit` or `max`resizing behaviour, see next paragraph`fit``quality`integer, `0` to `100`thumbnail quality, bigger is better but files are heavier`85``upsize`booleanwhether or not small images should be enlarged with larger thumbnail size`true``subdir`booleancreate a subdirectory for each image`true`**Method** can be set to :

- `basic` : image will be resized to the exact dimension, without keeping aspect ratio.
- `fit` : image will be resized to fit in specified width and / or height, keeping aspect ratio.
    If only one dimension is specified, unspecified dimension (width or height) will be adjusted depending on the other dimension.
    If both are specified, image will be cropped if necessary.
- `max` : image will be resized to fit in specified width and / or height, keeping aspect ratio, without cropping.

### Without mod\_rewrite

[](#without-mod_rewrite)

You should still be able to use Tajine without mod\_rewrite or with a HTTP server other than Apache. However the images URLs to call would be a bit different (and not so nice) :

`index.php?filename={name}.{extension}&width={width}&height={height}&method={method}&quality={quality}&upsize={upsize}`

e.g. :

- `index.php?filename=image.jpg&width=1280&height=1024&method=basic&quality=90&upsize=false`
- `index.php?filename=image.jpg&height=1024`

Notes
-----

[](#notes)

Generated thumbnails are saved as image files in `tajine/public/img/cache` directory.
When using mod\_rewrite these files names are the same string as the URL provided for images generation. Therefore Apache doesn't even need to process PHP to display the cached version.
They can safely be deleted to process the generation again.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3111d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2296855ae3ab03be6fdc22c97fa6538a60fbe71c8cbf0a6a46906f76b60c0c9e?d=identicon)[crachecode](/maintainers/crachecode)

---

Top Contributors

[![krodelabestiole](https://avatars.githubusercontent.com/u/409655?v=4)](https://github.com/krodelabestiole "krodelabestiole (3 commits)")

---

Tags

imageresizecache

### Embed Badge

![Health badge](/badges/crachecode-tajine/health.svg)

```
[![Health](https://phpackages.com/badges/crachecode-tajine/health.svg)](https://phpackages.com/packages/crachecode-tajine)
```

###  Alternatives

[duncan3dc/helpers

A collection of useful helper classes

13188.0k](/packages/duncan3dc-helpers)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
