Skip to content

Commit

Permalink
BUGFIX:
Browse files Browse the repository at this point in the history
  • Loading branch information
t3solution committed Jul 22, 2021
1 parent bdf7bf2 commit cc087de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Classes/Utility/ResponsiveImagesUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public function createPictureTag(

// Use width of fallback image as reference for relative sizes (1x, 2x...)
$referenceWidth = $fallbackImage->getProperty('width');
$referenceHeight = $fallbackImage->getProperty('height');

// if lazyload enabled add data- prefix
$attributePrefix = $lazyload ? 'data-' : '';
Expand Down Expand Up @@ -158,6 +159,7 @@ public function createPictureTag(

// Provide image width to be consistent with TYPO3 core behavior
$fallbackTag->addAttribute('width', $referenceWidth);
$fallbackTag->addAttribute('height', $referenceHeight);

// Add metadata to fallback image
$this->addMetadataToImageTag($fallbackTag, $originalImage, $fallbackImage, $focusArea);
Expand Down

1 comment on commit cc087de

@t3solution
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BUGFIX/ADD #122

Please sign in to comment.