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.
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
Put all images in /images/jitr/originals. If the image to resize is called "italy.png" Just call
$this->widget('ext.justintimer.EJustInTimeR', array( 'image' => 'italy.png' ));
By default, it is displayed the thumbnail.
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.
$this->widget('ext.justintimer.EJustInTimeR', array( 'image' => 'italy.png' ));
$this->widget('ext.justintimer.EJustInTimeR', array( 'image' => 'italy.png', 'display' => 'big' ));
$this->widget('ext.justintimer.EJustInTimeR', array( 'image' => 'italy.png', 'alt' => 'This is alt value =)' ));
Total 10 comments
https://github.com/sensorario/jitr
It need to be tested a bit. I've tried id and it work.
I think new version will be helpful.
Thanks
Yes,
I would like to try the new one
I am unable to find the url of the github for this project.
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?
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.
Hi,
I am getting error if i am trying to call multiple images at a time
Can anyone help me out.
Well done !
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(), ) ); ?>~~~
This is what I was looking for !!! Thanks a lot.
Leave a comment
Please login to leave your comment.