- Issue created by @primsi
- Status changed to Needs review
over 1 year ago 6:03am 25 July 2023 - Status changed to Needs work
over 1 year ago 6:03am 26 July 2023 - 🇨🇭Switzerland berdir Switzerland
+++ b/src/Plugin/EntityBrowser/Widget/PexelsWidget.php @@ -531,6 +591,13 @@ class PexelsWidget extends WidgetBase { + + if (isset($this->configuration['resize_width']) || isset($this->configuration['resize_height'])) { + /** @var \Drupal\Core\Image\Image $image */ + $image = $this->imageFactory->get($file_uri); + $image->scale($this->configuration['resize_width'] ?? NULL, $this->configuration['resize_height'] ?? NULL); + $image->save(); + }
can't you check the download size here? Is it even necessary you first check the image width and height and only do this if either is bigger than the configured size?
- Status changed to Needs review
over 1 year ago 8:01am 28 July 2023 - Status changed to Closed: won't fix
20 days ago 1:08pm 2 December 2024 - 🇸🇮Slovenia primsi
Better approach in ✨ Provide a way to download custom size Active . Closing this one.