Skip to content

Frameright/image-display-control-wordpress

Repository files navigation

WordPress Plugin Version

Image Display Control WordPress Plugin

➡️ See this document rendered at docs.frameright.io/wordpress

An easy way to leverage image region metadata on your site. Made with ❤️ by Frameright. Power to the pictures!

Which image metadata?

An image file (e.g. JPEG, PNG) contains metadata, i.e. information about the image, e.g. which camera model was used or when the picture has been taken. This information is usually stored at the beginning of the file. Three main formats, or bags of metadata, can coexist in a file and the information they contain partly overlap:

  • IPTC IIM, developed in the early 1990s;
  • Exif, late 1990s;
  • XMP, late 2000s.

The IPTC IIM format (often just called IPTC format) and the Exif format represent sets of key-value pairs, whereas the newer XMP format is an XML representation of a more complex RDF graph. The XMP Specification Part 3 specifies how the XMP metadata are to be serialized and stored in each image file format (e.g. JPEG, PNG).

The IPTC council has defined a standard for storing Image Regions in XMP. Image Regions are useful for describing specific areas of the image (e.g. objects, people) or for indicating how the image should be cropped or rotated to best fit a given container. The Frameright webapp can be used to define such Image Regions and insert them in the metadata of a picture.

This WordPress plugin reads such Image Regions in order to automatically crop images the best possible way, depending on which container they are being displayed in.

Youtube

How does it work?

When rendering a post or a page, the plugin looks for images that have Image Region metadata and replaces them on the front-end with a web component automatically zooming on the best suited Image Region, effectively doing better than a classical middle-crop.

  🔧 Contributing

  📝 Changelog

  🙏 Dependency tree / credits