• Resolved twistedsymphony

    (@twistedsymphony)


    WP 2.5 changed the default file extension for thumbnail images which was *.thumbnail.jpg in WP 2.3 and is now *.HHH-WWW.jpg

    The problem is my site (https://collectorsedition.org) uses a plugin (that I wrote) to grab the thumbnail image from the name of the original image.

    It’s now broken for all newly uploaded images because I don’t know what the thumbnail image is.

    Before I could always assume it was .thumbnail.jpb but now I don’t know what it is because it’s .???-150.jpg

    I can modify the wordpress files to “fix” this but I’d rather not because then I have FIX it every time I upgrade. Is there some way I can modify my plugin to know what the thumbnail image from the name of the original file? I needs to work with the 300+ images that I’ve already uploaded with the .thumbnail extension as well as the newly uploaded files.

Viewing 4 replies - 16 through 19 (of 19 total)
  • My problem with the new naming system is that I set the dimensions of the medium size image so that it fits my design. When I insert an image, the image is hardcoded into the post.

    If I decide to change the design, I would need to regenerate the thumbnails/medium images to fit the new design (there are plugins that do this). With the naming conventions as is however, the hardcoded images would break.

    If the filenames were still file-thumbnails.ext or file-medium.ext this wouldn’t be an issue.

    I think the developers should add an option so that the user is able to choose the naming convention of thumbnails along with a function that will rebuild thumbnails/medium images according to the media settings.

    Is there a way to change the default naming of thumbnails through a plugin?

    Thread Starter twistedsymphony

    (@twistedsymphony)

    Phoat, if you change the design of your site… and the setting for the sizing of medium and thumbnail images it wouldn’t matter what the name of the file is in your post… because you’d have to go back through and regenerate all of the medium and thumbnail images ANYWAY… think about it, it’s not done on the fly, it’s done on upload… at that point changing the file name is trivial.

    As a personal update, I’ve been using the method outlined by Otto42 above and it’s worked exactly as I’ve needed it. Thanks again.

    @twistedsymphony,

    How did you get it to work??
    How do you find the first image $attachment_post_id from the $post->ID?
    So that i get the first image attachment from a post.

    I’m so close i can feel it! ??

    twistedsymphony,

    As I said in my post, there are plugins that regenerate the thumbs and medium images based on the settings you specify in the media settings.

    This plugin is an example that regenerates thumbnails after you’ve uploaded them.

    https://www.viper007bond.com/wordpress-plugins/regenerate-thumbnails/

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Default thumbnail extension changed.’ is closed to new replies.