Viewing 10 replies - 1 through 10 (of 10 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    What shortcode or function are you using to display? I could check for any filters on badge sizes to use. It also could be a css thing that resizes images. For that part, I’d need a url that shows an example of it happening.

    Thread Starter aducale

    (@aducale)

    Hi Michael,

    I can’t share the link because the site is IP protected since it’s just in the building stages.

    I am using the following short code to display certain types of acheivements:

    [badgeos_achievements_list type=state limit=50]

    The badge I uploaded was 280×280 but it resizes it to 100×100.

    The other page where it’s really a problem is the individual badge page. See the image.

    https://postimg.org/image/n1q756p53/

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    So I traced the function calls from that shortcode to the point that it fetches badge images.

    Inside of badgeos_get_achievement_post_thumbnail() located in achievement-functions.php line 521, it appears like your setup may be failing to fetch the featured image used for the badge’s image. First it tries for the specific achievement/badge, then it falls back to the default for the achievement type, and if that doesn’t have one either, it tries to fetch one from Credly. At that point, if it can’t find a defined height/width, it goes to a default of 100×100 and finally does the fetching from credly.

    Thread Starter aducale

    (@aducale)

    Is there anyway I can fix this?

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Just as a test for the moment, have you set a default image for the achievement type? If not, try that and see if it gets used before it gets all the way to the 100×100 stage.

    Thread Starter aducale

    (@aducale)

    I set the featured image for “states”

    https://postimg.org/image/71m4x5dal/

    And it doesn’t even seem to be taking because the default badge shows up on the states page.

    https://www.mossmotors.com/2014Challenge/states/
    https://s23.postimg.org/5za49ew97/state.png

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Aha, I was slightly wrong earlier. It IS using your images, it’s not getting to that Credly point. However, it’s using the custom image size named “badgeos-achievement” which is getting registered at 100px by 100px.

    It also appears that there’s no filter at any point along this path that you could change which registered image size it calls. I can’t call this a bug, but I can call this a lack of customization. The closest you’ll find at the moment is this filter “badgeos_render_achievement” and it’s going to have all of the html that goes along with each badge. That one would, at best, require regex to fetch the image url to change.

    That said, I’m going to file a GitHub issue for you for some filters for changing this. I agree that there should be a way to use a different image size, instead of having 100×100 forced on you. If we get it in soon enough, it could get in the next release. Stay tuned.

    Thread Starter aducale

    (@aducale)

    Thanks Michael. I will anxiously await the next release. ??

    Thread Starter aducale

    (@aducale)

    Hey Michael,

    I noticed an update. Was the size issue resolved?

    Thanks.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    I don’t recall seeing any filter additions for this in the changelog. At this point, you’re still left with this suggestion from me earlier

    The closest you'll find at the moment is this filter "badgeos_render_achievement" and it's going to have all of the html that goes along with each badge. That one would, at best, require regex to fetch the image url to change.

    Still worth upgrading though. ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Badge Size’ is closed to new replies.