Magic Zoom (MagicZoom) and Yoast Sitemaps

Wiki.TerraBase.info
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Magic Zoom is a WordPress Plugin that creates an enlarged version of an image. This allows viewers to see details that would otherwise not be visible.

A Magic Zoom image is inserted into a WordPress Post or Page via ShortCode. For example;

[magiczoom id="WhatEverID"]

All done and everything is perfect and fine, right? Wrong. What about SEO (Search Engine Optimization)?

Problem

Will SEO Plugins like Yoast detect that as an image and include it in a Sitemap? Nope. The above ShortCode will of course show up in the final HTML as an image / <IMG>, but Yoast does not "scan" that because Yoast scans the text in the Post or Page's SQL Table.

Documentation of Magic Zoom

In terms of ShortCode? Forget about it. That's it (in the above example). Everything else is done via its GUI in WordPress.

The Good News

The good news is that Magic Zoom takes all of the information from a Media File (Image) and inserts it into the HTML. Items like the Image's Title Attribute will be used in the Anchor / <A> Element / Tag (Image / <IMG> Elements / Tags do not have a Title Attribute). The URL to the Image's Post Page is included as an HREF Attribute in the Anchor / <A> Element / Tag (Not sure why, because the JavaScript for Magic Zoom takes over the ability to click on it and re-purposes it for usage in a Gallery if multiple images are used. The Alternate / ALT Attribute information from an Image is also inserted into the Image <IMG> Element / Tag.

Sadly the SRCSET Attribute for the Image / <IMG> Element / Tag isn't included.

Most of this is great for the end search engine, but not so much for Yoast or any other SEO Plugin be able to detect and include in a Sitemap Index.

What to do?

Well, there is no additional documentation or modifications one can make to the Magic Zoom ShortCode, so that's a dead end.

One strategy might be to configure a "Featured Image" and then use a Plugin to hide the image, but that only works on Pages and Posts. In one of my specific usage instances which involves Timeline Express, that Plugin treats the information as Post rather than a Page (which makes sense) and does not allow for a Featured Image to be configured (long story there). It does claim an "Announcement Banner" is an equivalent to Featured Image, but it doesn't work as desired.

How about inserting a hidden image? Tried that by inserting an image, setting its class to "hidden-image-css" and then inserting some custom CSS into the theme (.hidden-image-css {display:none; !Important} (if the !Important directive wasn't included, other CSS overrode the display:none setting, and since the order of how WordPress inserts names into the Class Attribute can't be controlled, it's really the only way.). But alas, if the ALT / Alternate information isn't also included, it does NOT use the media's default information, so that blows. And sadly with Timeline Express, the Custom CSS Plugin does not allow for additional CSS to be injected into the Announcement / Event.

Maybe another Plugin?

Installation Directory

Oh, and keep in mind, Magic Zoom for WordPress is installed in the intuitively named Directory: mod_wordpress_magiczoom, so you can easily find it alphabetically by its name.