Image Formatr

Image Formatr Install Statistics

0
100%
Today: 0 Yesterday: 0 All-time: 20,099 downloads
Image Formatr Icon

Try plugin: Image Formatr

We'll create fresh WordPress site with Image Formatr installed. You have 20 minutes to test the plugin after that site we'll be deleted.

Takes ~10 seconds to install.

About Image Formatr

Formats all content images on a page / post giving them captions and popups.

3


0


0


0


1

updated: 9 years ago
since: 14 years ago
author: Steven Almeroth

Description

Image Formatr is a simple plugin that goes through all the content images on
posts & pages, and with zero user changes:

  1. gives them a standardized thumbnail format using CSS
  2. puts a caption underneath each one using the title
  3. makes them linked so they popup in full size

Thumbnails are not generated, but will be used if available in the media library.
This plugin is driven by the prettyPhoto
library so we could call this plugin a prettyPhoto integration plugin.

*Note: Supports images on Flickr.

Usage

This only applies to the images you put in your content, not theme graphics.

<img
  src="/images/picture.jpg"
  class="alignright"
  title="A sample caption"
  link="http://example.com/"
  hint="Image borrowed from example.com"
/>

After the plugin runs, the output to the browser looks like:

<div class="img alignright">
  <a
    href="/images/picture.jpg"
    rel="prettyPhoto[main]">
    <img
      src="/images/picture.jpg"
      title="Image borrowed from example.com" alt=""
      width="140" height="90"/>
  </a>
  <div style="width: 100%;">
    <a href="http://example.com/" target="_blank">A sample caption</a>
  </div>
</div>

Documentation

You can find plugin documentation at http://warriorself.com/blog/about/image-formatr/

Features

  • Standardizes all thumbnails without altering posts
  • Supports displaying images from Flickr: <img flickr=”1234567890″
    title=”The magnificent Ceiba at the Archaeological Site of Palenque.”>
  • Generates image captions using the image title or alt
  • Integrates WordPress media library thumbnails
  • Gives popups for WordPress gallery images (adjust priority setting to 12)
  • Shows all content images on the blog as small thumbnails
    (does not create new thumbnails but can use Media Library for thumbs)
  • Allows for fine-grained control of each image’s format
  • Zooms image to large size when clicked using the
    prettyPhoto
    library
  • Outputs standard XHTML compliant markup

Gallery Support

To get WordPress Gallery images to popup, this plugin must run at a priority
greater (later) than the [gallery] shortcode which runs at priority 11. Therefore
set the priority setting to 12 in the Administration Options.

Overrides

The actions of the plugin are enabled and disabled with administration settings
but can be overridden on each individual image.

  • usemysize – true/false – true = do not ignore an image width and height
  • usemya – true/false – true = do not ignore a parent anchor tag
  • nocap – true/false – true = do not create a caption
  • nofx – true/false – true = no popup effect
  • link – string url – make the caption a link to the url
  • hint – string txt – this will be the new image title
  • asis – true/false – true = don’t change nuthin
  • group – string txt – separate popup slideshows
  • thumb – string url – image thumbnail (version 0.9.7)
  • page – single/!single/front/!front – page filtering (version 0.9.7)

If you want to surround an image with an anchor tag <a>, then you should add
a usemya attribute within the image tag or else your anchor will be ignored
and replaced. If you do not want the popup effect at all, add a nofx attribute
to the image. If you do not want any caption, you can specify nocap, or just
leave the title blank. And to have the plugin completely ignore an image and
output the content directly from the post, use the asis attribute.

Example

<a href="http://www.example.com/">
<img
  src="/images/picture.jpg"
  title="Click to visit website"
  nocap="true"
  usemya="true"
/></a>

Note: concerning the true/false overrides, do not include “false” parameters
like <img usemya="false">, i.e these overrides should only include the attributes
for which you want to designate a “true” value.

Credits

Image Formatr is Copyright 2014 Steven Almeroth and
licensed under a GPL license.

Based on: image-caption
by Yaosan Yeo.

PrettyPhoto: The JavaScript
Image thumbnail viewer
library by Stephane Caron is licensed under GPLv2.

Website

More information, including how to contact me, is available at
warriorself.com.

Translations

  • If you would like to contribute a translation of the administration settings
    screen please have a look at the
    .pot
    file and post to the support forum
    of e-mail to me.

ToDo List

  • add screenshot of output image with caption

Wish List

  • phone-home feature, activate/deactivate stats helper with version number
  • add admin option for html/xhtml <img/> closing tags
  • add admin option for moving title attribute to alt attribute should it
    overwrite an existing alt?
  • debug mode could show images not found and whatnots and profiling stats
  • change [flickrset id=”1234″] to [flickr set=”1234″]
  • change [flickr pid=”123″] to [flickr img=”123″]
  • show “the_content” ordering vis a vie wp-hooks-filters-flow.php
    Priority 8 :
    WP_Embed->run_shortcode()
    WP_Embed->autoembed()
    Priority 10 :
    wptexturize()
    convert_smilies()
    convert_chars()
    wpautop()
    shortcode_unautop()
    prepend_attachment()
    Priority 11 :
    capital_P_dangit()
    do_shortcode()
    Priority 20 :
    ImageFormatr->filter()

Bug List

  • bug: add_settings_field() <label for=”s”> not <label for=”stdthumb”>
    work-around is to only use unique single char id fields defined as constants