Last updated July 11, 2026, Version 0.34
Filter whether to generate the retina (2×) static-map variant.
Disabling this halves the on-disk footprint at the cost of losing true retina sharpness on HiDPI displays — the browser will still upscale the 1× PNG, but labels and road lines will look softer than a native 2× render. Default true.
Auto-generated Example
add_filter(
'gatherpress_static_map_generate_2x',
function( bool $enabled ) {
// Your code here.
return $enabled;
}
);
Parameters
bool$enabledWhether to generate the 2× variant.
Files
apply_filters( 'gatherpress_static_map_generate_2x', true )