===Preload Critical Assets ===
Contributors: snehalpancholi
Tags: performance, preload, fonts, CSS, speed
Requires at least: 6.0
Tested up to: 6.7
Stable tag: 1.0.0
Requires PHP: 8.1
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add rel="preload" link tags for fonts, stylesheets, scripts, and images to reduce render-blocking and improve perceived load time.

== Description ==

Preload Critical Assets lets you define a list of assets (fonts, CSS files, scripts, images, or API endpoints) that should be preloaded in the browser before the page finishes loading. Adding preload hints is one of the fastest performance improvements you can make — it tells the browser to fetch critical resources earlier, reducing latency for assets discovered late in the render chain.

**Features:**

* Simple admin table — add as many assets as you need
* Five resource types: font, style (CSS), script (JS), image, fetch (JSON/API)
* Automatic `crossorigin="anonymous"` for fonts
* Correct `type` MIME attribute for web fonts (woff2, woff, ttf, otf)
* Preload tags output at priority 1 in `wp_head` (before everything else)
* Zero impact on page load — pure HTML link tags, no JavaScript
* Clean uninstall

== Installation ==

1. Upload the `preload-critical-assets` folder to `/wp-content/plugins/`.
2. Activate the plugin.
3. Go to **Settings → Preload Assets**.
4. Click **Add Asset**, enter the URL and select the type.
5. Save.

== Frequently Asked Questions ==

= Does this slow down my site? =
No. `<link rel="preload">` tags are hints to the browser. They do not block rendering and add only a few bytes of HTML to the head.

= What should I preload? =
Start with the web fonts used in your above-the-fold content and any hero image. Avoid preloading assets that are not used on every page — unnecessary preloads waste bandwidth.

= Does this work with page caching plugins? =
Yes. The tags are output in PHP and will be included in any cached HTML.

== Changelog ==

= 1.0.0 =
* Initial release.

== Screenshots ==

1. Settings page showing the asset list with URL and type columns.
