Support » Requests and Feedback » [Plugin: Simple Post Thumbnails] Need a random value in thumbnail preview url to avoid browser cache

  • When you upload another pic after a first one, the preview still show the previous one, because the browser cached the previous thumbnail image.

    Adding a random value (i.e &random=128578291752891) at the end of
    /wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wordpress/wp-content/thumbnails/1.jpg&w=200&h=150&zc=1&ft=jpg will solve this issue.

Viewing 1 replies (of 1 total)
  • for those who needs a quick fix, edit simple-post-thumbnails/thumbnail-poster.php

    Change:
    <img style=”border: 1px solid #ccc; padding: 3px;” src=”<?php echo $thumb; ?>” alt=”Thumbnail preview” />

    to

    <img style=”border: 1px solid #ccc; padding: 3px;” src=”<?php echo $thumb.”&random=”.rand(); ?>” alt=”Thumbnail preview” />

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Simple Post Thumbnails] Need a random value in thumbnail preview url to avoid browser cache’ is closed to new replies.