thumbnailer Replace <img> tags on the fly with generated thumbnails and a link to the image. Useful with fancybox extension.

  1. Requirements
  2. Usage
  3. Resources
  4. Credits

Replace <img> tags on the fly with auto generated thumbnails and a link to the image. Useful with the fancybox extension.


Yii 1.1 or above.


<?php $this->beginWidget('application.extensions.thumbnailer.Thumbnailer', array(

        'thumbsDir' => 'images/thumbs',
        'thumbWidth' => 200,
        'thumbHeight' => 150, // Optional
); ?>

// This portion is captured by the widget
<img src="images/example.jpg" />
<img src="images/anotherExample.jpg" />
<img src="images/yetAnotherExample.jpg" />

// Replace the images with thumbnails
<?php $this->endWidget(); ?>

This outputs:-

<a href="images/example.jpg" rel="gallery">
    // The thumbnail images are created when the page is loaded for the first time!
    // To create the thumbnail, simpleimage is used.
    <img src="images/thumbs/example.jpg">
<a href="images/anotherExample.jpg" rel="gallery">
    <img src="images/thumbs/anotherExample.jpg">
<a href="images/yetAnotherExample.jpg" rel="gallery">
    <img src="images/thumbs/yetAnotherExample.jpg">


The following extension must be installed:-


  • phpQuery is used internally by the extension. A distribution of phpQuery is included in the zip file.
7 0
1 597 downloads
Yii Version: 1.1
License: GPL-3.0
Category: User Interface
Developed by: Hindol
Created on: Jan 19, 2012
Last updated: 10 years ago


show all

Related Extensions