Support » Fixing WordPress » Cropping an image regenerates thumbnails, scaling doesn't

  • Resolved Madlandproject

    (@madlandproject)


    Hello everyone,

    I am currently implementing a gallery for a client website on two custom post types. To minimize possible mistakes on the client’s part, I am retrieving the attachments in a custom loop on the single-posttype.php page instead of using the gallery shorttag.

    I am a little confused by the media manager in WordPress : If I upload an image, called “myphoto.jpg” for example, WordPress will generate “myphoto-120×80.jpg” and “myphoto-300×199.jpg” (my thumbnail and small image sizes respectively). As one would expect.

    Now if I crop the image to a ratio specific to my site (642×425 in my case), and click save, WordPress will generate “myphoto-randomchars-120×80.jpg” and “myphoto-randomchars-300×199.jpg”. So far so good.

    Now the weird part : If I scale the image (by clicking the scale image link, entering the new dimensions and clicking the “scale” button), then the image is automatically saved with new randomchars appeneded to the name, but the thumbnails aren’t generated.

    Is this an oversight? Is this by design? I have seen similar issues pop up and I know about the regenerate thumbnails plugin and the TimThumb class but these solutions don’t seem very elegant.

    One solution would be to change the “medium” or “large” size in the media settings, or even a custom size, but I’m not keen on multiplying the number of files.

    How do you fine people implement and explain media management for clients who aren’t tech-savy ?

    Thank you for your time

    Robin

Viewing 5 replies - 1 through 5 (of 5 total)
  • Scott Fennell

    (@scofennellgmailcom)

    What’s your objection to the regenerate thumbnails plugin?

    Hi Scott

    Either my client has to run it after scaling every photo, or run it once after uploading several (which means checking the box next to each photo in the media manager) or regenerating all thumbnails (which means potentially uselessly reprocessing hundreds of files in the future). As I mentioned, he isn’t very tech orientated person and the less steps involved, the better.

    I have decided to go with registering additional image sizes. It looks like multiple files is going to be a simpler problem to fix, and it’s not a problem that will arise soon.

    Now the weird part : If I scale the image (by clicking the scale image link, entering the new dimensions and clicking the “scale” button), then the image is automatically saved with new randomchars appeneded to the name, but the thumbnails aren’t generated.

    I am confused, if I remember correctly, your thumbnail is going to be the same size no matter how large the original image is. A 500×500 image would have, say, an 80×80 thumbnail. If you scale the original to 300×300, you’d still have an 80×80 thumbnail. Why would it regenerate? What would be the point? In other words, those thumbnails aren’t generated proportionally to the original image size.

    One solution would be to change the “medium” or “large” size in the media settings, or even a custom size, but I’m not keen on multiplying the number of files.

    You won’t multiply files. You will just change the sizes. Files already present will remain, of course, which I believe is the reason for the ‘regenerate thumbnails’ plugin mentioned above.

    How do you fine people implement and explain media management for clients who aren’t tech-savy ?

    Media management doesn’t seem too complicated to me, except for the ‘Gallery feature’. That is horrible. I don’t think I have ever had to explain the media management to anyone. I have had to explain the ‘gallery’ feature and we all ended up stunned. I have no idea who cooked it up or why it was cooked up the way it is, but it does not work the way I’d expect or the way anyone I talked to expected. The problem is that the system shoves all attached images into a ‘gallery’ instead of letting the user specifically and intentionally create galleries.

    Your thumbnail is going to be the same size no matter how large the original image is. A 505×500 image would have, say, an 80×80 thumbnail. If you scale the original to 300×300, you’d still have an 80×80 thumbnail. Why would it regenerate? What would be the point? In other words, those thumbnails aren’t generated proportionally to the original image size.

    Good point. The problem was I was using the full size URL as a base for thumbnail URLs in a Javascript file. Definitely not best practice, I know so I’ve update the script : Instead I’m using a HTML data attribute to pass the thumbnail url

    You won’t multiply files. You will just change the sizes. Files already present will remain, of course.

    I now have added two image sizes for my gallery, seeing as I want to keep Medium and Large for future use in content. The size of multiple files shouldn’t be a problem, the site has decent hosting, and that is the easiest part of the equation to solve when the problem does arise.

    I don’t think I have ever had to explain the media management to anyone.

    I wish I had your clients 😉 I’ve had to explain to a client’s specifically trained “Webmaster” that you can’t drag and drop files on to a burned CD like a USB drive (the client then proceeded to buy Adobe Flex Builder so they could maintain the app we built for them…)

    I wish I had your clients 😉

    🙂 I have my own stories 🙂

    Besides, most of my trouble is with staff, not with clients… 🙁

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Cropping an image regenerates thumbnails, scaling doesn't’ is closed to new replies.