Img-Resize

Developer

Joseph Wensley

3rd Party (Free)

67 downloads (last 90 days)

MIT License Download v2.5.0

EE Version Support

  • ExpressionEngine 2

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Plugin

Tags

Img-Resize let's you resize images on the fly in your EE templates.

Requirements

  • ExpressionEngine 2.x
  • PHP 5+
  • GD2 or Imagick

Parameters

Required

The src and at least 1 dimension parameter are required

src: Path to the image can be a full or relative (to the index.php) system path or a local url
width and/or height: Absolute width or height to resize to
max_width and/or max_height: Maximum width or height to resize to

Optional

The following options can also be set globaly in a config file using like $config['img_resize:param'] = 'VALUE'

quality: The quality of the resized image between 0-100. Default is 100.
retina_quality: The quality of the resized retina image between 0-100. Defaults to whatever quality is.
just_url: Set this to 'yes' to only return the URL to the image
sharpen: Setting this to 'yes' will cause images to be sharpened after they are resized
urldecode: Setting to 'no' will disable decoding of the src url
handle_retina: Set to 'no' to disable
h_align and/or v_align Adjusts where the crop is done from, default is 50 (center of the image)

These should only be set if you know what you are doing
base_url: URL to where your images are stored, default is your base_url
base_path: The base path to where your images are stored, this is used to determine the path to your images when using relative image paths
cache_path: Full path to where your images are cached, default is FCPATH/images/resized
cache_url: URL to where your images are cached, default is your base_path + /images/resized

Attributes

These will be set as attributes on the img tag

alt
title
id
class

Example Usage

{exp:img_resize src="/assets/img/imagename.jpg" width="100" height="100" alt="Some alt text"}
// Outputs
<img src="http://domain.com/images/resized/assets/img/imagename_100x100.jpg" width="100" height="100" alt="Some alt text">

{exp:img_resize src="/assets/img/imagename.jpg" width="100" height="100" just_url="yes"}
// Outputs
http://domain.com/images/resized/assets/img/imagename_100x100.jpg

Retina Handling

If you have a 100x100 image named like image@2x.png and resize to 25x25 the plugin will generate two images.

The first image will be 25x25 and named like image_25x25.png The second image will be 50x50 and named like image_25x25@2x.png

This should provide support for many retina handling methods that use @2x as an identifer, like http://retinajs.com/.

A data-retina attribute will also be set on the img tag containing the url to the retina image.

 

Download Img-Resize

EE Support Downloads Add-On Version Release Date
Not Specified Download 2.5.0 Apr 30, 2014

Img-Resize Links

This entry was created December 7, 2012, 10:17 am.
This entry was last updated May 1, 2014, 9:37 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!