• ggoodrichipp

    (@ggoodrichipp)


    I’ve created an ‘upcoming’ list of events via a short code, and I’d like it to maintain the aspect ratio of the images, thus I’m using #_EVENTIMAGE{50,0} or #_EVENTIMAGE{0,50} in order to limit the size to 50px. However, my images always come out square, regardless of whether I specify zero for the x or the y.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • timrv

    (@timrv)

    Hello,

    One reason it might be showing as a square is probably because the image have been pre-formatted with your image sizes of WordPress. I would suggest using a plugin like: https://www.ads-software.com/plugins/regenerate-thumbnails/ to regenerate the images for your site.

    Thread Starter ggoodrichipp

    (@ggoodrichipp)

    Ok, so I installed and ran that plugin, and it regenerated all images, but that didn’t appear to change the outcome. I still get square images in the event list.

    Thread Starter ggoodrichipp

    (@ggoodrichipp)

    I’ve found a spot in classes/em_event.php line 1970 that looks like this:

    if( get_option('dbem_disable_thumbnails') ){

    If I force this condition to true, then my images scale the way I expect them to. Something like this:

    if( true || get_option('dbem_disable_thumbnails') ){

    Obviously this is silly to put code like that in there, but that section inside that ‘if’ seems to be what allows the scaling to work, and apparently whatever the ‘else’ clause is doing is not allowing it. So I don’t know how WP thumbnails are supposed to work, but if it is using them, then my images all end up square.

    Oh, and I tried disabling thumbnails in the general settings for EventsManager, and reverting my changes, but that didn’t seem to fix it.

    Thread Starter ggoodrichipp

    (@ggoodrichipp)

    Okay, after more digging, I see that there are two thumbnail settings in EventsManager. I’m not sure what the difference between them is, for sure, but one of them actually makes my images scale properly. The two I’ve found are:

    Settings->General Options->Disable Thumbnails –> dbem_thumbnails_enabled (yes, this is a very confusing name as it is the opposite of its description)

    Settings->Performance Options->Disable WordPress Thumbnails -> dbem_disable_thumbnails

    If I set the latter to true, the scaling works as advertised. I don’t see any behavior change from the former option being true or false.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘#_EVENTIMAGE{x, y} is not scaling images’ is closed to new replies.