# YooTheme SEO Figure Element

A WordPress plugin that adds a semantic, SEO-optimized figure element to YooTheme Pro builder.

## Features

- ✅ **Semantic HTML5**: Uses proper `<figure>` and `<figcaption>` elements
- ✅ **Modern Image Formats**: Auto-detects and serves AVIF + leverages YooTheme's WebP generation
- ✅ **Performance Optimized**: Includes `loading="lazy"` and `decoding="async"` attributes
- ✅ **SEO Best Practices**: Proper alt text, semantic markup, accessible captions
- ✅ **Fully Integrated**: Works seamlessly with all YooTheme Pro features

## Installation

1. Upload the `yt-seo-figure` folder to `/wp-content/plugins/`
2. Activate the plugin through WordPress Admin → Plugins
3. Open YooTheme Pro builder and find "SEO Figure" under Custom elements

## Requirements

- WordPress 5.8+
- PHP 7.4+
- YooTheme Pro 4.0+

## Usage

1. Add "SEO Figure" element to your page
2. Select an image from media library
3. Add alt text for SEO
4. Optionally add a caption
5. Configure styling options as needed

## HTML Output Example

```html
<figure class="el-figure">
  <picture>
    <source srcset="image.avif" type="image/avif" media="(min-width: 800px)">
    <source srcset="image.avif" type="image/avif">
    <source srcset="image.webp" type="image/webp" media="(min-width: 800px)">
    <source srcset="image.webp" type="image/webp">
    <img src="image.jpg" alt="Description" width="800" height="600" 
         loading="lazy" decoding="async" class="el-image">
  </picture>
  <figcaption class="el-caption">Your caption here</figcaption>
</figure>
```

## AVIF Support

The plugin automatically detects AVIF files:
- Upload an image (e.g., `image.jpg`)
- Add an AVIF version with the same name (e.g., `image.avif`) to the same directory
- The plugin will automatically include it in the picture element

## License

GPL-2.0+

## Author

AICET Development Team

## Version

1.0.0
