diff --git a/Handler/FieldType/Image.php b/Handler/FieldType/Image.php index 70aa4aa..bdcfbbd 100644 --- a/Handler/FieldType/Image.php +++ b/Handler/FieldType/Image.php @@ -74,7 +74,14 @@ protected function getFieldValue( Field $field, $tagName, array $params = array( try { - return $this->imageVariationService->getVariation( $field, $this->content->versionInfo, $variationName )->uri; + $variationUri = $this->imageVariationService->getVariation( $field, $this->content->versionInfo, $variationName )->uri; + + if ( $variationUri[0] === '/' && ( $request = $this->requestStack->getCurrentRequest() ) !== null ) + { + $variationUri = $request->getUriForPath( '/' . ltrim( $variationUri, '/' ) ); + } + + return $variationUri; } catch ( InvalidVariationException $e ) { diff --git a/Resources/doc/CHANGELOG.md b/Resources/doc/CHANGELOG.md index f00dea5..5b57ba8 100644 --- a/Resources/doc/CHANGELOG.md +++ b/Resources/doc/CHANGELOG.md @@ -1,6 +1,10 @@ Netgen Open Graph Bundle changelog ================================== +## 1.1.1 (17.08.2015) + +* Make sure `ezimage` field type handler generates full image URI even when variation returns the relative URI + ## 1.1 (15.05.2015) * Implement the ability to define the array of field identifiers to be used in field type handlers