WordPress: Thumbnail HTML addition for upload.php

(This post is copied from this one on the support forums, I want to make sure my |WordPress| code has a home on this site.)

The Context: |WordPress| allows you to upload images, optionally creating a thumbnail of the image automagically.

The Problem: The handy HTML it gives you after uploading an image does not include any reference to the thumbnail.

The Solution: I modified wp-admin/upload.php so that, if you specify a thumbnail, it will find the size of the thumbnail and create HTML that displays the thumbnail image, wrapped with a link to the original image. It actually gives you two versions of the HTML - the first has the thumbnail code included, the second is the same HTML that the page used to generate.

There’s a pseudo “diff” here:

http://redmonk.net/uploadwiththumbnail_code.phps

I’d be very interested in feedback. I’ve tested it on my server, and it seems to work fine.

R.E.M. Says:

About this Entry

This page contains a single entry by Steve published on August 16, 2004 8:07 PM.

How To Help - Ukrainian Phrases was the previous entry in this blog.

Web Standards Checklist is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

OpenID accepted here Learn more about OpenID