Skip to content

Preview Image for Property Lists

When a link to a property list is shared – for example the list of all listings in a location – social networks and messengers show a preview image. WP-ImmoMakler picks this image for you. You can set a custom photo for each location or have a map of the location used.

The preview image appears as og:image and as <meta name="thumbnail"> in the HTML head of the list. If Yoast SEO or Rank Math SEO is active, the SEO plugin outputs the Open Graph tags and takes the image from WP-ImmoMakler for them. Without an SEO plugin, WP-ImmoMakler outputs the Open Graph tags of the list itself: title, address, preview image and, if available, the description of the location. If another SEO plugin that writes its own Open Graph tags is active (All in One SEO, SEOPress, The SEO Framework, Slim SEO), WP-ImmoMakler refrains from doing so, so that nothing appears twice. The structured data of the SEO plugin carries the same image as the image of the page (primaryImageOfPage); from PLUS, the page there additionally points via mainEntity to the schema.org/ItemList of the list.

WP-ImmoMakler takes the first image in this order that is available:

RankImageWhere you set it
1Social media image from Yoast SEO or Rank MathIn the SEO plugin when editing the location, Social tab
2Custom image of the location**WP-ImmoMakler → “Preview Images”
3Map of the locationMap as Preview Image for Location Lists setting
4Photo of the first property in the list–

Your website’s general default image from Yoast SEO or Rank Math only comes into play if no property in the list has a photo.

You set the images in your website’s backend (wp-admin) under **WP-ImmoMakler → “Preview Images”. The page lists the locations of your properties with the number of their properties; the tabs also give you access to the other categories such as property types or marketing types.

  1. Find the location using the search field or scroll through the list.
  2. In its row, click Select Image and choose an image from the media library or upload a new one.
  3. Click Use Image. The selection is saved immediately.

With Remove Image you undo the selection. The image itself stays in the media library. With View List you open the property list of the location.

The names and slugs of locations cannot be changed on this page. They come from the import and are overwritten by it; the import leaves the preview image unchanged.

A landscape image of 1200 × 630 pixels is recommended. As with property photos, WP-ImmoMakler always delivers a JPG, PNG or GIF for the preview, even if your website converts images to AVIF or WebP.

If you have not set a custom image for a location, WP-ImmoMakler can show a map of the location instead. To do so, enable the Map as Preview Image for Location Lists option in your website’s backend (wp-admin) under WP-ImmoMakler → Settings → SEO/AEO/GEO. It is off by default.

This is how the map is created:

  • WP-ImmoMakler looks up the location via your geocoding service and shows it with its surroundings, centered and in a section that suits the size of the location. The position of your properties helps to tell apart locations with the same name. If the service does not find the location, the map shows the area where the location’s properties are situated.
  • The map contains no markers for individual properties.
  • It is drawn by the service your website uses for static maps: Google Maps in all editions, and from PLUS also the provider you chose in the Geo Services tab under Map preview image service (see Maps of the Properties). Colors and map type follow your map settings.
  • The map is created once on the first request of the list, stored on your website as a JPG of 1200 × 630 pixels and delivered from there. A network that fetches the preview therefore does not contact the map service. For each location there is one request to the geocoding service and one to the map service; the map is only regenerated when the section or your map settings change.
  • If no map can be created, for example because no API key is set, the preview shows the photo of the first property. WP-ImmoMakler tries again after one day.

Google Maps, Mapbox and MapTiler draw their attribution into the image themselves. For Geoapify and for maps assembled from tiles, WP-ImmoMakler writes the attribution the map provider requires into the bottom right corner, because otherwise it would not appear anywhere in a link preview.

With the immomakler_archive_image filter you replace the preview image of a list. It receives the selected image and the term of the list – null on the general property list and on search results:

add_filter( 'immomakler_archive_image', function ( $image, $term ) {
if ( $term && 'immomakler_object_location' === $term->taxonomy && 'hamburg' === $term->slug ) {
return [
'url' => 'https://www.example.com/wp-content/uploads/hamburg-hafen.jpg',
'width' => 1200,
'height' => 630,
'type' => 'image/jpeg',
];
}
return $image;
}, 10, 2 );

With the immomakler_opengraph_archive_tags filter you turn off, or force, the Open Graph tags that WP-ImmoMakler outputs on property lists without an SEO plugin:

add_filter( 'immomakler_opengraph_archive_tags', '__return_false' );

With the immomakler_static_map_attribution filter you set the attribution that is written into a map. An empty text means that the map service draws its attribution itself:

add_filter( 'immomakler_static_map_attribution', function ( $attribution ) {
return '© OpenStreetMap contributors';
} );