Image Shadow

Caveat

Unfortunately, due to ill-health, this plugin has not been developed or supported properly for some years. It works with the latest versions of WordPress (including on this website) but could possibly conflict with any WordPress features added after 2008 — e.g. custom post types — if you use them.

Purpose

Adds realistic, soft drop-shadows to images in your posts.

This is version 1.1.0 . It has been tested on WordPress 2.5-2.6.2.

  • 1.1.0 allows shadows to be added to only those images with a specified class attribute; by leaving the background colour blank you can have the plugin generate shadows which will overlay textured backgrounds transparently.
  • 1.0.0b2 makes some minor changes to be ready for WordPress 2.6.
  • 1.0.0b1 is the first public release.

Image Shadow scans your posts for <img alt="" /> tags and replaces the image link with one hosted on your website which has been transformed to add a shadow and, optionally, a frame. You can choose to keep the image itself at its original size (so the new image, with shadow etc., is larger) or to shrink the image a little to accommodate the new shadowed image in the original image’s space. Only jpg images are handled.

Installation Instructions

  1. If upgrading from a previous version, first deactivate the plugin via the Plugins page and delete the plugin folder from your server.
  2. Upload both the plugin folder (image-shadow) to your /wp-content/plugins/ directory.
  3. Go to your admin Plugins page and activate Image Shadow.
  4. Use the admin Settings|Image Shadow page to set all the available options.

Usage and Options

The plugin needs to be able to write the cached image files to a folder on your server and will appear to do nothing if it can’t. If you run a caching program you will need to clear the cache to see the modified images.

The plugin’s settings screen uses javascript to enhance the interface, including giving a live preview of the effect of each setting, but if javascript is disabled the settings should still work. Right now the javascript interface works best in a modern browser and has problems in Internet Explorer. Transparent shadows will only work in Internet Explorer if a workaround is in place for png files with alpha transparency.

56 replies on “Image Shadow”

  1. Anyone got any ideals how we can call this from outside ‘the loop’?

    I was hoping to call the render_effects function on the image I want to cache, but that doesn’t work (possibly due to the function not being able outside the loop)

  2. Hmm…thinking about it again I’m trying to use it in the loop after all: it’s an image pulled from the post’s meta data

    If I try to call render_effects() on the image I want to cache I get an undefined function error…if I try to include the image-shadow.php file in that page it starts giving me ‘can not redeclare’ errors.

    hmm…

  3. This is a great plugin! It let’s me acheive the exact look I was going for on my blog. I know that programming things like this take time and effort. I can’t thank you enough for doing it. In future versions please consider an option that would allow shadows on by default except when a specific class is assigned. Sort of the opposite of what you have now.

  4. This plugin is awesome sauce, but I am having one difficulty. It appears as though it only effects images that are output from the_content() and not from the_excerpt() (or in my case, the_excerpt_rereloaded() …) Is there a way to also include images to be included in those instances? (Btw, i’m running wp 2.7.1 at the moment)

    Thanks much 🙂

Comments are closed.