From 7c4a4ccdda4936788187d8504e5d3b4b7097d2f2 Mon Sep 17 00:00:00 2001 From: Andrii Podanenko Date: Wed, 26 Jan 2022 14:23:44 +0200 Subject: [PATCH] fix: upgrade path --- .../openy_prgf_gallery/openy_prgf_gallery.install | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/openy_prgf/modules/openy_prgf_gallery/openy_prgf_gallery.install b/openy_prgf/modules/openy_prgf_gallery/openy_prgf_gallery.install index 306e2f12..2a40e96f 100644 --- a/openy_prgf/modules/openy_prgf_gallery/openy_prgf_gallery.install +++ b/openy_prgf/modules/openy_prgf_gallery/openy_prgf_gallery.install @@ -172,3 +172,15 @@ function openy_prgf_gallery_update_8010() { 'image.style.gallery_thumbnail' ]); } + +/** + * Apply Webp to all image styles. + */ +function openy_prgf_gallery_update_8012() { + $path = \Drupal::service('extension.list.module')->getPath('openy_prgf_gallery') . '/config/install'; + $config_importer = \Drupal::service('config_import.importer'); + $config_importer->setDirectory($path); + $config_importer->importConfigs([ + 'image.style.prgf_gallery' + ]); +}