WordPress plugin intelligence profile

Twitter Image Host

Host Twitter images from your blog and keep your traffic, rather than using a service like Twitpic and losing your viewers.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 3.2
Current version0.6.1
WordPress coverageTested up to WordPress 3.2
Minimum stackWP 3.0 · PHP —
Directory statusactive
Last directory update7 Aug 201115y ago
Active installations10Adoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Twitter Image Host version 0.6.1 as active, updated 15y ago and tested up to WordPress 3.2.

Overview

About this plugin

Keep your traffic in the family! Host Twitter images on your own site, with support for comments and trackbacks, image

resizing and thumbnailing with Lightbox.

Twitter doesn’t yet come with its own inline image support, so we tend to be limited to using image hosting services,

and linking to them with short URLs. So, services like Twitpic host the image, and we direct traffic to them in return.

Better to take advantage of that traffic, and host images on your own site. This way, viewers come to your site, instead

of someone else’s!

Posted images are displayed in your normal WordPress template, with support for comments and trackbacks, without any

setup required. Most themes should work with this, but if not, or if a different layout is required, a custom theme template

can also be provided (see ‘Creating a Template’).

ly,

compatible with Tweetie (for iPhone) and any other Twitter clients that speak this protocol and offer configuration of

custom image hosting services.

Uses Twitter’s authentication and a list of authorised accounts, so you can let others use your image host too. You can even

post status updates to Twitter while submitting images.

Provides a widget and shortcode to display uploaded images. This supports filtering by Twitter account, styling with CSS,

and Lightbox/Thickbox.

Widget

To use the widget, simply visit the Widgets page and drag the “Twitter Images” widget into a sidebar and configure it.

Shortcode

Shortcodes are snippets of text that can be inserted into pages and posts. These snippets are replaced by various generated content.

Twitter Image Host provides a ‘twitter-images’ shortcode to display images you have uploaded within a page/post.

Available parameters:

count Number of items to display id Single ID (eg 'abcde') of one image to display, or multiple IDs separated by commas (abcde,fghij) view Image thumbnail view: squares, proportional, large or custom custom_thumbnail_width Custom width for thumbnails, when 'view' is 'custom' custom_thumbnail_height Custom width for thumbnails, when 'view' is 'custom' custom_thumbnail_crop Whether to crop custom thumbnails author Comma-separated list of Twitter account names to limit results to columns Number of columns of images to display lightbox 'true' to use Lightbox/Thickbox

Example:

[twitter-images columns=4 lightbox="true"]<h3>PHP function</h3>

As well as the shortcode, you can also use call twitter_image_host_images() from within a template to

produce the same output. Pass the same arguments as the shortcode as associative array values:

>

php template (see ‘Creating a Single Template’, below) to display

other posted images when viewing an image. Use the_twitter_image_author() to filter the list, to show

only other submissions by the same Twitter account as the one of the currently displayed image.

Template Tags

This plugin provides several template tags, for use both in displaying single posts (see ‘Creating a Single Template’), and for custom pages which display

many posts in a loop (see ‘Using Template Tags in a Loop’).

The available template tags are:

Single Entry Tags

the_twitter_image_permalink

Returns the URL to the view page

the_twitter_image_url

Returns the full URL to the image, or the image thumbnail if the original image was large

the_twitter_full_image_url

Returns the URL to the full-sized image, if one exists, or false otherwise

the_twitter_image_title

The title of the image

the_twitter_image_date

The date (timestamp) of the image – use date() to configure the display

the_twitter_image_author

The associated Twitter account

the_twitter_image

Returns HTML to display the image and a link to the full-sized image if it exists, with Lightbox rel tags.

Loop Tags

query_twitter_images

Search for Twitter images

Available parameters (passed as associative array):

count Number of items to display id Single ID (eg 'abcde') of one image to display, or multiple IDs separated by commas (abcde,fghij) author Comma-separated list of Twitter account names to limit results to

has_twitter_images

Use with loop: Determine if there are more images

next_twitter_image

Use with loop: Get the next image

Creating a Single Template

php’). However, if you wish, you can create a

custom template to display hosted images. php’, located within your

current theme directory.

Creating a template to use this information is fairly straightforward if you have just a little knowledge of HTML or PHP:

  • On your server (via an FTP program, etc.), navigate to your current theme. This will live within wp-content/themes.
  • Copy an existing template – single.php is usually a good candidate – and call it twitter-image-host.php.
  • Open up twitter-image-host.php, and delete everything that looks post-related: This usually includes everything between

the have_posts call and the matching endif, and may include some other surrounding content like an ‘Edit this post’ link.

-

Replace that which you have just deleted with something that uses the ‘single entry’ template tags above, like the following:

> </p>

-

Save the file, add some content (see the ‘Posting Images’ section), and see how it looks.

Using Template Tags in a Loop

Just like the WordPress Loop template tags, the template tags provided by this plugin can be used to display multiple posted entries.

This can be used to create a custom page template that lists all submitted entries, with more flexibility than that offered by the shortcode.

Use begins with a call to query_twitter_images(), possibly with an argument to configure the search. If the result is true, then the loop begins,

conditional upon has_twitter_images(), and starting with next_twitter_image() to load the next entry. The single template tags can then be used

to customise the display of each entry.

Here is an example of use:

></div> </div>

><h3>Posting Images</h3>

To start posting from your WordPress blog, select the “Twitter Image Host” menu item from the “Posts” administration section.

Enter a title for your image, select your image file, hit Submit, and you will be given the URL for the image. If you wish

to tweet straight from this facility, you will need to follow the instructions from that page to set up the plugin.

To access this facility from an application, use the access point displayed on the Twitter Image Host options page under “Settings”.

ly, etc.

To post from Twitter (Tweetie 2) for iPhone, visit Twitter/Tweetie’s settings, and within Services, Image Service, select ‘Custom’, then

enter the API URL as listed on the options page.

Making the URL even shorter

com/blog), then the short URLs generated by this plugin will

look like http://your-site/blog/xxxxx. htaccess trickery.

Here’s how:

  • Create and open a new file in your site’s webroot called “.htaccess”. If there’s one already there, just open that up and prepare to edit at the bottom.

-

Add the following, replacing ‘blog’ with the real subdirectory under which WordPress is installed:

*) /blog/$1 [L] </IfModule>

This will take any requests that:

  • Are located in the web-root (start with a slash, followed by anything but a slash until the end)
  • Have a corresponding file within Twitter Image Host’s content directory

Then, it’ll rewrite the request silently to the real Twitter Image Host URL, without the viewer seeing.

  • In Twitter Image Host settings, set the ‘Override URL Prefix’ option to ‘http://your-site.com/’

Credits

German Translation: Walter Güldenberg

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • hosting
  • images
  • twitter
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 3.2

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 3.2.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to3.2
Minimum requirementsWordPress 3.0 · PHP not listed
Update activity7 Aug 201115y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.