justintimeimageresizer

Create resized images and thumbnail only first time is needed
7 followers

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 =)'
)); ?>

Total 10 comments

#7669 report it
sensorario at 2012/04/07 10:47am
New versione on github

https://github.com/sensorario/jitr

It need to be tested a bit. I've tried id and it work.

#7535 report it
yureshwar at 2012/03/28 08:11am
Hi sensorario

I think new version will be helpful.

Thanks

#7532 report it
claudio.ferrari at 2012/03/28 05:04am
New version

Yes,

I would like to try the new one

#7531 report it
yureshwar at 2012/03/28 04:51am
Could you please give the github issue list url

I am unable to find the url of the github for this project.

#7529 report it
sensorario at 2012/03/28 03:49am
Someone is interested in new version?

I've implemented a new version of jitr (JustInTimeResizer). This new version allow us to have 1 default size (original) and all others size we want. With a config file, we can create all fonder for all size:

verylittle little small original half

You think this will be helpful?

#7528 report it
sensorario at 2012/03/28 03:47am
Read the error message

If you read the error message you can see that ejustintimeresizer is redeclaring a class. Just remove this declaration. I please you to add this issue to github so I'll update this extension.

#7526 report it
yureshwar at 2012/03/28 03:02am
Getting error if i am trying to display multiple image files

Hi,

I am getting error if i am trying to call multiple images at a time

Fatal error: Cannot redeclare class Image_GD_Driver in /var/www/project/protected/extensions/image/drivers/GD.php on line 380

Can anyone help me out.

Solved it. It was image extension problem. Thanks sensorario.

#6577 report it
claudio.ferrari at 2012/01/19 09:20am
@Drini

Well done !

#6506 report it
Drini at 2012/01/15 04:13pm
Brilliant! fantastic

This was a quality extension, thank you so very much!

I modified it slightly to use with EfancyBox gallery extension ( http://www.yiiframework.com/extension/fancybox/ ) New version of EJustIntimeR.php http://pastebin.com/rNfz3gn1 The view:

~~~ [php]

<?php $this->widget('application.extensions.fancybox.EFancyBox', array( 'target'=>'a[rel=gallery]', 'config'=>array(), ) ); ?>~~~

#6339 report it
claudio.ferrari at 2011/12/30 06:40pm
Great Job

This is what I was looking for !!! Thanks a lot.

Leave a comment

Please to leave your comment.

Create extension
Downloads