justintimeimageresizer Create resized images and thumbnail only first time is needed

  1. Description
  2. Install
  3. Usage
  4. Requirements
  5. Important!!
  6. Display thumbnail
  7. Display big image
  8. Set title or alt

Description

This extension resize images and thumbnail only if resized image or his thumbnail not exists. This means that you can upload images without take care of dimensions of "big" image or "thumb". Not only this!!! If you need to change dimensions of all images or all thumb, just change configuration file. When an image will be called. EJustInTimeR will resize it.

Install

Create this structure folders:

/images
    /jitr
        /originals - this is folder of original images
        /big       - this is folder of rezized big image
        /thumb     - this is folder of resized thumb image

Usage

Put all images in /images/jitr/originals. If the image to resize is called "italy.png" Just call

<?php $this->widget('ext.justintimer.EJustInTimeR', array(
    'image' => 'italy.png'
)); ?>

By default, it is displayed the thumbnail.

Requirements

  • Yii 1.1 orvabove
  • PHP 5.3
  • image (yii extension)

Important!!

Leave images in originals folder. If customer need to change all images dimensions ... just delete images in big and thumb folder. Them will be generated just in time the first time that some one request it.

Display thumbnail

<?php $this->widget('ext.justintimer.EJustInTimeR', array(
    'image' => 'italy.png'
)); ?>

Display big image

<?php $this->widget('ext.justintimer.EJustInTimeR', array(
    'image' => 'italy.png',
    'display' => 'big'
)); ?>

Set title or alt

<?php $this->widget('ext.justintimer.EJustInTimeR', array(
    'image' => 'italy.png',
    'alt' => 'This is alt value =)'
)); ?>
6 0
12 followers
1 010 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: File System
Developed by: sensorario
Created on: Nov 30, 2011
Last updated: 12 years ago

Downloads

show all

Related Extensions