• The Context: WP 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:
    https://rm.bookdev.com/upload_with_thumbnail_code.phps
    I’d be very interested in feedback. I’ve tested it on my server, and it seems to work fine. (See it in action here.)

Viewing 3 replies - 31 through 33 (of 33 total)
  • Has anyone found a fix for this to work with 1.2.2 yet?

    -Michael

    bump – why wasn’t this something already pary of WP?

    I’ve modified monkinetic’s code so that the link from the thumbnail to the original image looks like this:

    <a href="https://link2originalphoto" title="titleofpic"><img src="pathtothumbnail" />
    </a>

    instead of:

    <a href="https://link2originalphoto" title="titleofpic" /><img src="pathtothumbnail" /></a>

    I’ve also created a zipped file with the edited upload.php here. Just unzip and upload the modified upload.php file into your /wp-admin directory. If there are any problems, please email me!

Viewing 3 replies - 31 through 33 (of 33 total)
  • The topic ‘Thumbnail HTML addition for upload.php’ is closed to new replies.