• Resolved tracihoff

    (@tracihoff)


    My members don’t want to resize their photos. Instagram wants 700x700px, so I’d like to allow them to upload images up to that size.

    If you answer with code, please tell me exactly where to put it. I’m using a child theme, and I understand a bit about the codeex and the file structure necessary to over write default files….but I’m not a PHP author.

    Thanks in advance. Events Manager is working very well for us.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    You could try checking this placeholder: #_EVENTIMAGE{x,y} More information here: https://wp-events-plugin.com/documentation/placeholders/

    Other way is to control the Size using CSS. You might need to have some few knowledge on it to resize. If you’re not familiar I would suggest hiring a Developer for it.

    Thread Starter tracihoff

    (@tracihoff)

    Yes, that {x,y} works, but when I add that via the plugin Settings, I get two images: the default one above the title and another (resized with the x,y) where ever I add that code.

    I need to over write the default format…I can’t find it.

    Additionally, it would be good practice to add the custom image size to your theme.

    If not (the default way), EM will tell WordPress to show the image at the custom size, but since there is no image of that size in your upload directory, WordPress will load the full size image, leading up to heavy load times. That is with {x,y} as well as css sizes.

    By adding the custom image size to your theme (functions.php), WordPress will automatically create a separate file for that image size. So when it’s called in the front-end, the smaller image file will be loaded.

    To setup the custom image size, add this to your theme functions.php:

    function stonehenge_add_image_size() {
    add_image_size( ’em-custom-image’, WIDTH IN PX, HEIGHT IN PX, true ); // (cropped)
    }
    add_action(‘after_setup_theme’, ‘stonehenge_add_image_size’);
    Now WordPress will automatically create the new image file on every new upload.

    BUT…
    You probably already have uploaded images. So to make sure the current/old images are also processed, you need to install the Regenerate Thumbnails plugin and run it just once: https://www.ads-software.com/plugins/regenerate-thumbnails/.

    @timrv,
    Image sizing in css is very basic:
    img {
    width: 200px;
    height: 200px;
    }

    But again, that is not good for your page load. ??

    The image above the title (guessing, because we have no link to your website) is probably the post/event featured image. You will need to
    1) either delete that from the event edit page, BUT then Google will never be able to show an image in its search results.
    2) Edit the single-event.php or single.php template in your theme directory to not show the featured image (post_thumbnail) if it’s an event.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to resize Events picture default size?’ is closed to new replies.