CC-IMG-Shortcode

0

This plugin adds the [img] shortcode which replaces the <img> html tag. It’s also enables adding new media to post/page via the ‘Add media’ button by automatically inserting

Version
Last updated
Active installations
WordPress Version
Tested up to
PHP Version
Rating
Total ratings
Tag
This plugin is outdated and might not be supported anymore.

Description

This plugin adds the [img] shortcode which replaces the <img> html tag. It’s also enables adding new media to post/page via the ‘Add media’ button by automatically inserting the formatted shortcode code to the editor.
You can simply add the [img] shortcode with a media ID to display:

[img 123 /]

or a fully formatted [img] shortcode:

[img 123 align="center" size="full" caption="Sample text" title="Sample text" desc="Sample text" alt="Sample text" url="http://example.com/" /]

It’s supports srcset and sizes parameters.

Tips & Tricks

You can use your own html template file for displaying the img tag by using filter:

add_filter( 'ClearcodeIMG_Shortcodetemplate', function() { return '/themes/clearcode.cc/templates/img.php'; } );