From d2e4cfc5ff99a2f5994e36a73a2aea291de1d7b7 Mon Sep 17 00:00:00 2001 From: Eric van der Vlist Date: Sat, 22 Mar 2025 18:40:43 +0100 Subject: [PATCH] Working on image sizes --- js/WP-GPX-Maps.js | 2 +- wp-gpx-maps-utils.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/WP-GPX-Maps.js b/js/WP-GPX-Maps.js index 64442a0..ad2eb28 100644 --- a/js/WP-GPX-Maps.js +++ b/js/WP-GPX-Maps.js @@ -903,7 +903,7 @@ var WPGPXMAPS = { if ( photos.length > 0 ) { var photoLayer = L.photo.cluster().on( 'click', function( evt ) { var photo = evt.layer.photo; - var template = '

{name}

'; + var template = '

{name}

'; evt.layer.bindPopup( L.Util.template( template, photo ), { minWidth: 'auto' }).openPopup(); diff --git a/wp-gpx-maps-utils.php b/wp-gpx-maps-utils.php index 1e3c49a..6e1d62c 100644 --- a/wp-gpx-maps-utils.php +++ b/wp-gpx-maps-utils.php @@ -22,10 +22,10 @@ function wpgpxmaps_getAttachedImages( $dt, $lat, $lon, $dtoffset, &$error ) { $img_src = wp_get_attachment_image_src( $attachment_id, 'full' ); $img_thmb = wp_get_attachment_image_src( $attachment_id, 'thumbnail' ); $img_metadata = wp_get_attachment_metadata( $attachment_id ); - $img_file = get_attached_file( $attachment_id, $unfiltered ); + $img_file = get_attached_file( $attachment_id, false ); $item = array(); - $item['data'] = wp_get_attachment_link( $attachment_id, array( 105, 105 ) ); + $item['data'] = wp_get_attachment_link( $attachment_id, 'gpxmaps' ); if (!strpos('alt',$item['data'])) { if (!empty(get_the_excerpt($attachment_id))) { $item['data'] = str_replace('src=','alt="' . esc_attr(get_the_excerpt($attachment_id)) . '" src=',$item['data']);