Rest/Field/TypeValue.php
public function ezimage(Field $field, Content $content, $language, $imageFieldIdentifier, $options = [])
    {
        if (!isset($field->value->id)) {
            return '';
        }

        $variations = $this->configResolver->getParameter('image_variations');
        $variation = 'original';

        if ((!empty($options['image'])) && in_array($options['image'], array_keys($variations))) {
            $variation = $options['image'];
        }

        try {
            $uri = $this
                ->imageVariationService
                ->getVariation($field, $content->versionInfo, $variation)
                ->uri;

            if (strpos($uri, 'http://:0') !== false) {
                $uri = str_replace('http://:0', 'http://0', $uri);
            }

            return parse_url($uri, PHP_URL_PATH);
        } catch (SourceImageNotFoundException $exception) {
            return '';
        }
    }
public function ezimage(Field $field, Content $content, $language, $imageFieldIdentifier, $options = [])
    {
        if (!isset($field->value->id)) {
            return '';
        }

        $variations = $this->configResolver->getParameter('image_variations');
        $variation = 'original';

        if ((!empty($options['image'])) && in_array($options['image'], array_keys($variations))) {
            $variation = $options['image'];
        }

        try {
            $uri = $this
                ->imageVariationService
                ->getVariation($field, $content->versionInfo, $variation)
                ->uri;

            if (strpos($uri, 'http://:0') !== false) {
                $uri = str_replace('http://:0', 'http://0', $uri);
            }

            return parse_url($uri, PHP_URL_PATH);
        } catch (SourceImageNotFoundException $exception) {
            return '';
        }
    }
public function ezimage ( Field $ field , Content $ content , $ language , $ imageFieldIdentifier , $ options = [ ] ) { if ( ! isset ( $ field -> value -> id ) ) { return '' ; } $ variations = $ this -> configResolver -> getParameter ( 'image_variations' ) ; $ variation = 'original' ; if ( ( ! empty ( $ options [ 'image' ] ) ) && in_array ( $ options [ 'image' ] , array_keys ( $ variations ) ) ) { $ variation = $ options [ 'image' ] ; } try { $ uri = $ this -> imageVariationService -> getVariation ( $ field , $ content -> versionInfo , $ variation ) -> uri ; if ( strpos ( $ uri , 'http://:0' ) !== false ) { $ uri = str_replace ( 'http://:0' , 'http://0' , $ uri ) ; } return parse_url ( $ uri , PHP_URL_PATH ) ; } catch ( SourceImageNotFoundException $ exception ) { return '' ; } }
Method for parsing ezimage field.

@param \eZ\Publish\API\Repository\Values\Content\Field $field
@param \eZ\Publish\API\Repository\Values\Content\Content $content
@param string $language
@param string $imageFieldIdentifier
@param array $options

@return string

@throws \eZ\Publish\API\Repository\Exceptions\InvalidVariationException
@throws \eZ\Publish\Core\MVC\Exception\SourceImageNotFoundException
Method for parsing ezimage field .