# imagify/1.10/inc/3rd-party/amp/amp.php

Imagify Image Optimization: Optimize Images | Compress &amp; Convert to WebP/AVIF, version 1.10. 24 lines.

- Page: https://pluginprobe.com/plugins/imagify/1.10/code/inc/3rd-party/amp/amp.php
- Raw: https://pluginprobe.com/plugins/imagify/1.10/raw/inc/3rd-party/amp/amp.php
- Modified: 2019-05-06T14:27:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/imagify/1.10/code/inc/3rd-party/amp/amp.php#L10-L20`.

```php
<?php
defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );

/**
 * Compatibility with AMP plugin from WordPress.com VIP.
 */
if ( function_exists( 'is_amp_endpoint' ) ) :

	add_filter( 'imagify_allow_picture_tags_for_webp', 'imagify_amp_disable_picture_on_endpoint' );
	/**
	 * Do not use <picture> tags in AMP pages.
	 *
	 * @since  1.9
	 * @author Grégory Viguier
	 *
	 * @param  bool $allow True to allow the use of <picture> tags (default). False to prevent their use.
	 * @return bool
	 */
	function imagify_amp_disable_picture_on_endpoint( $allow ) {
		return $allow && ! is_amp_endpoint();
	};

endif;

```
