Skip to content

Commit df54afe

Browse files
committed
fix inappropriate style injection
1 parent b5ec608 commit df54afe

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Easy Image
22

3+
## [2.0.1] - 2024-07-20
4+
5+
- Fixed regression that unscroupulously injected opinionated styles into templates
6+
37
## [2.0.0] - 2024-07-13
48

59
- Updated dependencies for Craft 5
@@ -21,6 +25,7 @@
2125
- Added placeholder support
2226
- Added tests
2327

28+
[2.0.1]: (https://github.com/acalvino4/craft-easy-image/releases/tag/2.0.1)
2429
[2.0.0]: (https://github.com/acalvino4/craft-easy-image/releases/tag/2.0.0)
2530
[1.0.1]: (https://github.com/acalvino4/craft-easy-image/releases/tag/1.0.1)
2631
[1.0.0]: (https://github.com/acalvino4/craft-easy-image/releases/tag/1.0.0)

src/Plugin.php

-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use craft\base\Model;
1010
use craft\base\Plugin as BasePlugin;
1111
use craft\events\RegisterTemplateRootsEvent;
12-
use craft\events\TemplateEvent;
1312
use craft\web\View;
1413
use yii\base\Event;
1514

@@ -69,9 +68,5 @@ private function attachEventHandlers(): void
6968
Event::on(View::class, View::EVENT_REGISTER_SITE_TEMPLATE_ROOTS, function(RegisterTemplateRootsEvent $e) {
7069
$e->roots['easy-image'] = __DIR__ . '/templates';
7170
});
72-
73-
Event::on(View::class, View::EVENT_BEFORE_RENDER_TEMPLATE, function(TemplateEvent $event) {
74-
Craft::$app->getView()->registerCss("img, video {object-fit: cover;}");
75-
});
7671
}
7772
}

0 commit comments

Comments
 (0)