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 16 comments
I am working on a new version of this extension. It will be completely rewritten. I'll remove "image" extension dependency, and I'll suggest some trick to use the extension. Also, I hate name "justintimeimageresizer", maybe I'll change it.
Does it have to only be "big" or "thumb"? What if I have like 5 different sizes, will it work?
Also, would it work with remote HTTP files?
Here is a demo with this extension,fancybox and even xupload http://www.yiiframework.com/forum/index.php/topic/28368-yii-demo-with-automated-gallery/
But the xupload is not updated in that demo,but there is info about how to fix that in the xupload extension forum thread.
For any issues or any pull request ...
Hello DRINI, you mentioned that you made it possible to use the fancybox. Here:Your text to link here... But if I use your code, I get errors that TARGET is not in fanybox. It seems like you have modified also that one. Could you share your changes to the code? Thanks.
Hello out there, this extension is exactly what I was looking for, allowing me to change sizes when ever I want without re-doing all the images. Perfect. My next step is to use something like Fancybox, or PrettyBox.
Is there anybody who can confirm that this works togehter? Or what lightbox-tpyes are you using which are workable for this?
Thanks for any hints and ideas, gb5256
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.