# optimole-wp/4.2.11/vendor/codeinwp/optimole-sdk/src/Resource/ImageProperty/StripMetadataProperty.php

Optimole – Optimize Images | Convert WebP &amp; AVIF | CDN &amp; Lazy Load | Image Optimization, version 4.2.11. 41 lines.

- Page: https://pluginprobe.com/plugins/optimole-wp/4.2.11/code/vendor/codeinwp/optimole-sdk/src/Resource/ImageProperty/StripMetadataProperty.php
- Raw: https://pluginprobe.com/plugins/optimole-wp/4.2.11/raw/vendor/codeinwp/optimole-sdk/src/Resource/ImageProperty/StripMetadataProperty.php
- Modified: 2024-05-14T07:52:22+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/optimole-wp/4.2.11/code/vendor/codeinwp/optimole-sdk/src/Resource/ImageProperty/StripMetadataProperty.php#L10-L20`.

```php
<?php

declare(strict_types=1);

/*
 * This file is part of Optimole PHP SDK.
 *
 * (c) Optimole Team <friends@optimole.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Optimole\Sdk\Resource\ImageProperty;

use Optimole\Sdk\Resource\PropertyInterface;

class StripMetadataProperty implements PropertyInterface
{
    /**
     * Flag to determine if metadata should be stripped or not.
     */
    private bool $stripMetadata;

    /**
     * Constructor.
     */
    public function __construct(bool $stripMetadata = true)
    {
        $this->stripMetadata = $stripMetadata;
    }

    /**
     * {@inheritdoc}
     */
    public function __toString(): string
    {
        return sprintf('sm:%d', (int) $this->stripMetadata);
    }
}

```
