=== Apptimatic OG Image Overlay ===
Contributors: apptimatic
Tags: open graph, og image, social share image, facebook, twitter card
Requires at least: 5.0
Tested up to: 6.5
Requires PHP: 7.2
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate branded 1200x630 Open Graph share images automatically, with your post title and logo drawn onto a background you control.

== Description ==

Apptimatic OG Image Overlay builds the image that Facebook, LinkedIn and X display when someone shares your post. Instead of a random featured image, every link gets a consistent, branded card carrying the post title and your logo.

The card is composed on the server with PHP GD, cached per post, and regenerated automatically whenever the post or your settings change.

**Key features**

* **Fixed 1200x630 canvas.** The background is scaled and centre-cropped to fill the exact size social networks expect, so the `og:image:width` and `og:image:height` tags are always accurate.
* **Your choice of background.** Use one global image, or each post's own featured image with a fallback for posts that have none.
* **Logo overlay.** Place a transparent PNG anywhere on the canvas with pixel X/Y control.
* **Readable titles.** Text wraps on real font metrics, shrinks automatically when a headline is long, and can sit on an optional darkening layer so it stays legible over photos.
* **Any font.** Drop a `.ttf` or `.otf` file into `assets/fonts/` and pick it from a dropdown, with an adjustable point size.
* **Live preview.** The settings screen renders the card as you type, before you save.
* **Real SEO plugin compatibility.** With Yoast SEO or Rank Math active, the image is supplied through their own filters, so exactly one `og:image` tag is printed instead of two competing ones.

== Installation ==

1. Upload the `apptimatic-og-image-overlay` folder to `/wp-content/plugins/`, or install the ZIP through **Plugins > Add New > Upload Plugin**.
2. Activate the plugin through the **Plugins** menu.
3. Go to **Settings > OG Image Overlay** to configure it.
4. For sharp title text, upload a `.ttf` font file to `/wp-content/plugins/apptimatic-og-image-overlay/assets/fonts/`. Without one the plugin falls back to a low-resolution built-in font.

== Frequently Asked Questions ==

= Does this work with Yoast SEO or Rank Math? =

Yes. When either plugin is active it keeps ownership of the Open Graph tags, and this plugin supplies the generated image through `wpseo_opengraph_image` or `rank_math/opengraph/facebook/image`. Only one `og:image` tag is output. When no SEO plugin is present, the plugin prints the full tag set itself, including `og:image:secure_url`, dimensions, alt text and `twitter:image`.

= Where do I get a `.ttf` font file? =

Google Fonts is the easiest source. Download the family, take the `.ttf` file out of the archive, and upload it to the plugin's `assets/fonts/` folder. Any file you place there appears in the Font File dropdown.

= Why did my card change size after updating? =

Version 1.1.0 renders every card at exactly 1200x630. Previous versions passed the background through at its original size while still declaring 1200x630 in the meta tags, so some cards were cropped unpredictably by the networks.

= Are old images regenerated? =

Yes. The cache key includes the plugin version and every setting, so the first share after an update produces a fresh card. Old files stay in the uploads folder until you remove them.

= Does the server need anything special? =

The PHP GD extension, which nearly every host enables by default. The settings screen shows a warning if it is missing.

== Changelog ==

= 1.1.0 =
* Renamed from RD OG Image Overlay to Apptimatic OG Image Overlay. Existing settings are migrated automatically on first load.
* Every card is now composed on a true 1200x630 canvas using scale-and-crop, so the declared dimensions match the file.
* Rewrote SEO plugin compatibility: the image now goes through the Yoast and Rank Math filters instead of trying to strip their hooks, which never reliably prevented duplicate tags.
* Added font file selection, adjustable font size, automatic shrink-to-fit for long titles, and an optional darkening layer behind the title.
* Fixed title centring, which was off for fonts with a left side bearing.
* Added `og:image:secure_url`, `og:image:type`, `og:image:alt` and `twitter:image` output.
* Added a capability check to the preview AJAX endpoint and sanitize callbacks to every registered setting.
* Preview renders older than an hour are now cleaned up instead of accumulating in the uploads folder.
* Media library images are read from disk rather than fetched over HTTP, and remote fetches now carry a timeout.
* Responsive admin layout and clearer preview error reporting.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.1.0 =
Renamed plugin with accurate 1200x630 card rendering and proper Yoast/Rank Math integration. Settings migrate automatically; deactivate and delete the old RD OG Image Overlay plugin after activating this one.
