Displaying a lot of images on your site is great. You’ll notice, however, that they tend to eat up a lot of bandwidth. If your site is even remotely popular, this usually means you’ll have to upgrade your hosting account.
ImageShack is a service that offers free image hosting. So why not take advantage of it?
You could start uploading the images manually and modify each post, or you can just install this plugin and be done with it. It will take care of sending copies of all your current (and future) attachments to ImageShack. It will also dynamically replace the URLs when the images are to be displayed.
This way, if you decide you don’t want to use ImageShack anymore, you can disable the plugin and everything goes back to how it was.
You can either use the built-in WordPress plugin install menu, or do it the old-fashioned way:
- Unzip the .zip archive and put the imageshack-offloader folder into your plugins folder (/wp-content/plugins/).
- Activate the plugin from the Plugins menu.
- Go to Settings -> Imageshack Offloader and customize your settings.
The plugin will automatically filter the post content and replace image src attributes with ImageShack URLs.
If you want to get the URL for a specific image, you can use
get_imageshack_url($id, $size), where $id is the attachment id and $size is the desired size. Default is ‘full’. If there is no URL yet, the function will return false.
“Parse error: syntax error, unexpected T_CLASS…” Help!
Make sure your new host is running PHP 5. Add this line to wp-config.php:
Contributors & Developers
“ImageShack Offloader” is open source software. The following people have contributed to this plugin.
Interested in development?
- fix image replacement in post content
- added roll back mechanism for missing images
- better image replacing
- settings page bugfix
- use transloading instead of uploading
- initial release