WordPress.org

Ready to get started?Download WordPress

Forums

Cimy User Extra Fields
[resolved] Avatar size (9 posts)

  1. thv20
    Member
    Posted 2 years ago #

    Thanks for a great plugin!

    I read and searched the documentation but couldn't find it: how can we set the avatar thumbnail size for different templates? Like how in functions.php you can set sizes for the_post_thumbnail().

    So really I'm looking for how to achieve the equivalent of:

    add_image_size( 'city-avatar-small', 50, 50, true );
    add_image_size( 'cimy-avatar-large', 400, 350, true );

    Is this possible, or do I need to look elsewhere, maybe TimThumb?

    http://wordpress.org/extend/plugins/cimy-user-extra-fields/

  2. Marco Cimmino
    Member
    Plugin Author

    Posted 2 years ago #

    Avatar has exactly 512px thumbnail because changes also the gravatar that has this size constraint.
    en.gravatar.com/site/implement/images/

  3. thv20
    Member
    Posted 2 years ago #

    OK, but how do I show a small avatar on the front-end? Like 50x50pixels.

    If I have a list of 200 users, I don't want to load really big images 200 times and have to scale it down with CSS.

  4. Marco Cimmino
    Member
    Plugin Author

    Posted 2 years ago #

    Read the documentation on how to get the thumbnail picture and then just add a width attribute to your img tag.

  5. thv20
    Member
    Posted 2 years ago #

    Yes, I already know how to get the 512px thumbnail. I want a smaller thumbnail. I do mean the image is smaller, not just displayed smaller.

    What you suggest I do is really bad practise, terrible waste of bandwidth.

  6. Marco Cimmino
    Member
    Plugin Author

    Posted 2 years ago #

    The point is: why do you show 200 users in one unique page? You should use pages (with max 50 users per page), that's the real point if you _really_ want to save bandwidth.

  7. leeuniverse
    Member
    Posted 1 year ago #

    What is this person gibber-jabbering???

    A persons theme/site will auto-size the image according to where it's needed as it should. Although, your settings do have an "exact size" setting, so that I'm guessing should work for this person.

    But, really if this person want's a particular size at a particular place in their site, that place needs to designate the size. You can't have different sizes of an image unless you create different uploads and then the place where you show it calls that particular upload only, and not the standard avatar.

    In other words.... If they want to have an image that's not resized, then they need to create it separately and upload it separately, and call it separately. The complexity this creates is negligible to a site having one image that it resizes everywhere in it according to the sites needs.

    Plus, use a "Cache" plugin like Total Cache as you should be.... if you're so worried about resource usage.

    One other thing, I know wordpress itself creates copy's of an image at the various needed sizes. Oh and guess what.... I just checked the UPLOADS folder, and I see the AVATARS ARE ALSO RESIZED....

    In other words, if your theme location is working like it should, it should be using a smaller image sized copy. It's not actually re-sizing on the fly. Check your upload folder yourself.

  8. leeuniverse
    Member
    Posted 1 year ago #

    See here....?

    lee_avatar-16x16.jpg
    lee_avatar-40x40.jpg
    lee_avatar-64x64.jpg
    lee_avatar-96x96.jpg
    lee_avatar.JPG

    These are the images the upload has created. I would say it IS doing exactly what you are wanting???

  9. Usayd
    Member
    Posted 1 year ago #

    Thanks for your responses Marco.

    I don't believe the original question has been answered: It would be nice to be able to set avatars to be resized on upload below 512px, I have had to use the 'picture' field instead of 'avatar' because the plugin is not generating small enough avatars.

    You said that it's because Gravatar suggests 512px, but gravatar allows you to use an extension &s=80 to determine the size of the icon generated.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic