Skip to content

Commit

Permalink
Merge pull request #95 from tatiana-scandi/bugfix/2428/zoomed-images-…
Browse files Browse the repository at this point in the history
…low-resolution

#2428 - zoomed images low resolution
  • Loading branch information
lianastaskevica authored Apr 13, 2021
2 parents 45c2215 + c03eb48 commit a394fdf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Model/Resolver/Product/MediaGalleryEntries.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ public function resolve(
foreach ($product->getMediaGalleryEntries() as $key => $entry) {
$thumbnail = $this->getImageOfType($entry, 'scandipwa_media_thumbnail', 'thumbnail');
$base = $this->getImageOfType($entry, 'scandipwa_media_base', 'base');
$mediaGalleryEntries[$key] = $entry->getData() + ['thumbnail' => $thumbnail, 'base' => $base];
$large = $this->getImageOfType($entry, 'scandipwa_media_large', 'large');
$mediaGalleryEntries[$key] = $entry->getData() + ['thumbnail' => $thumbnail, 'base' => $base, 'large' => $large];

if ($entry->getExtensionAttributes() && $entry->getExtensionAttributes()->getVideoContent()) {
$mediaGalleryEntries[$key]['video_content']
Expand Down
5 changes: 3 additions & 2 deletions src/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ input ProductAttributeFilterInput {
}

type MediaGalleryEntry @doc(description: "MediaGalleryEntry defines characteristics about images and videos associated with a specific product") {
thumbnail: MediaGalleryImageOfType @doc(description: "The path of the thumbnail image on the server thumbnail")
base: MediaGalleryImageOfType @doc(description: "The path of the thumbnail image on the server thumbnail")
thumbnail: MediaGalleryImageOfType @doc(description: "The path of the thumbnail image on the server")
base: MediaGalleryImageOfType @doc(description: "The path of the base image on the server")
large: MediaGalleryImageOfType @doc(description: "The path of the large image on the server")
}

type ProductImage @doc(description: "Extend product Image fields for frontend-driven loading mechanism") {
Expand Down

0 comments on commit a394fdf

Please sign in to comment.