• Resolved zocimike

    (@zocimike)


    Hi, is it possible to change thumbnail aspect ratio in popup? I would like to use square images. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Camille V

    (@socrapop)

    Dear @zocimike

    You can do that only by adding some code. You can change thumbnail size by adding a function in functions.php, in your theme files:

    function cttm_remove_then_add_image_sizes() {
        remove_image_size( 'travelersmap-thumb' );
        add_image_size( 'travelersmap-thumb', 300, 300, true ); //crop the images at 300*300px exactly.
    }
    add_action('init', 'cttm_remove_then_add_image_sizes');

    However this will not change the popup size, you should also add some CSS on your website.
    Assuming you have the default popup style (without the excerpt), here is the necessary CSS:

    .travelersmap-container.leaflet-container .default-popup .img-mask {
    	max-height: unset;
    	height: unset;
    	aspect-ratio: 1/1;
    }
    Thread Starter zocimike

    (@zocimike)

    Thank you, you are great! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change thumbnail aspect ratio’ is closed to new replies.