• Resolved titush

    (@titush)


    Hi there,

    I have a really strange issue that I could use some help with. I have a site with multiple authors. I have uploaded their pictures for them which I previously standardized to a 3:4 aspect ratio in Photoshop. Some of the avatars display nicely with the correct thumbnail aspect ratios, others however don’t and are “forced” into the default aspect ratio of the site which is landscape 16:9.

    Not, in the admin options I changed the thumbnail size to the vertical aspect ratio, however this setting seems to be ignored completely.

    My site is powered by Genesis and Dynamik by CobaltApps (which allows for 5 custom thumbnail sizes on top of the WordPress default ones.

    A few pictures to illustrate the issue better:

    https://pbrd.co/1htsHNr

    https://pbrd.co/1htsPg0

    I am really stuck with this one as there seems to be no logic as to why some pictures get thumb nailed correctly, whereas others don’t.

    I ran a CHMOD 755 on the wp-content uploads folder in case your plugin wasn’t able to overwrite the dynamically generated thumbnails but that didn’t help.

    I also use “Force Regenerate Thumbnails” which does an excellent job. When looking at the URLS, it seems like your plugin uses the default thumbnail URL for the avatars, rather than a custom aspect ratio or file size thumbnail that would respect the size defined in wp user avater settings…

    Is there any idea you might have on how I can fix it? It really bugs me ??

    https://www.ads-software.com/plugins/wp-user-avatar/

Viewing 6 replies - 1 through 6 (of 6 total)
  • My plugin doesn’t use any different upload settings than the ones in your Media Settings. The exception being if you’re uploading as a Subscriber or Contributor and “Resize avatars on upload” is enabled. In this case, the original image is resized, not just the thumbnail.

    If you upload the problem images directly into the Media Library, do the images turn out the same? (Non-square thumbnails.)

    Thread Starter titush

    (@titush)

    Hi there and thanks for your quick reply. I don’t think the problem is the upload, images upload fine through the media library (although it would be nice if one could specify where to upload these to, as they mess up my media library after a while ;-)…

    I think the problem is that you use the default thumbnail function in WordPress, could that be?

    If a blog (like mine) defines the default thumbnail to be a landscape image, than all avatars are, too…

    For example, my thumbnail size in WP => Settings => Media is: 266 x 150 and that is the exact size of the avatars… Do you see what I mean?

    Thanks for your help!

    Yes, if you define your thumbnail as 266×150, that’s how the avatar thumbnails will turn out. The plugin uses the dimensions defined in your Media Settings. I don’t add a different media size for the avatars.

    You can try adding another media size and that may help:

    <?php add_image_size('avatar', 96, 96, 1); ?>

    Thread Starter titush

    (@titush)

    Hi there and thanks once again. I added the code you provided to the functions.php and “force regenerate thumbnails” all images in the media library. When I go to user => edit my profile, I can see the thumbnail in the correct aspect ratio right now.

    However, in the posts themselves, the thumbnail is still displayed in landscape mode…

    You can see here what I mean:

    https://pbrd.co/18HUnOz

    Is there anything else I need to do? I am not using a caching plugin and switched browsers and computers to avoid any browser cache operatirng…

    You have to change which media size you’re calling for in your theme. I’m assuming you’re using the_post_thumbnail(), so you’d have to change it to something like this:

    <?php the_post_thumbnail('avatar'); ?>

    Thread Starter titush

    (@titush)

    It worked, thanks a lot! Maybe a feature to put into the plugin for the next release? Custom-sized avatars would make sense…

    Cheers!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Strange thumbnail issue Avatar resized to site thumbnail size’ is closed to new replies.