Skip to content

An ExpressionEngine plugin that automatically switches images to use src.sencha.io

Notifications You must be signed in to change notification settings

easy-designs/easy_src_sencha_io.ee_addon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Easy src.sencha.io

Converts img elements found within the markup to Responsive images passed through the src.sencha.io web service.

Current Version

1.0 (12 October 2011)

Requirements

None.

License

Easy src.sencha.io is distributed under the liberal MIT License.

Usage

If you want responsive images without the headaches, you can use this plugin to implement Sencha’s src.sencha.io image service.

{exp:easy_src_sencha_io}
	{body}
{/exp:easy_src_sencha_io}

when the plugin encounters

<img src="foo.png" alt=""/>

it will remake that as

<img src="http://src.sencha.io/x100/http://your.domain.com/path/to/foo.png" alt=""/>

Providing it with additional params allows you to customize the image size:

{exp:easy_src_sencha_io max_width="50%"}
	{body}
{/exp:easy_src_sencha_io}

will generate the appropriate URL:

<img src="http://src.sencha.io/x50/http://your.domain.com/path/to/foo.png" alt=""/>

For more options, see http://www.sencha.com/learn/how-to-use-src-sencha-io/. Note: I’ve decided not to implement height adjustment, so just use a width value.

You can also turn off the default XHTML presentation (to drop the trailing slash) if you are an HTML5 fan:

{exp:easy_src_sencha_io xhtml="n"}
	{body}
{/exp:easy_src_sencha_io}

About

An ExpressionEngine plugin that automatically switches images to use src.sencha.io

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages