Changeset 3392398
- Timestamp:
- 11/09/2025 11:44:34 AM (5 months ago)
- Location:
- liteimage
- Files:
-
- 4 edited
-
tags/3.3.0/README.md (modified) (1 diff)
-
tags/3.3.0/src/Admin/AdminPage.php (modified) (1 diff)
-
trunk/README.md (modified) (1 diff)
-
trunk/src/Admin/AdminPage.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
liteimage/tags/3.3.0/README.md
r3392396 r3392398 122 122 ### Gutenberg Block 123 123 124 - Добавьте блок **LiteImage Image** в редакторе Гутенберга.125 - Укажите настольное и, при необходимости, мобильное изображение.126 - Настройте размеры по умолчанию и произвольные брейкпоинты (*min-width* / *max-width*), соответствующие размерам изображений.127 - Добавляйте любые HTML-атрибуты (`class`, `data-*`, `aria-*`, `loading`, `decoding`, и т.д.).128 - Плагин автоматически генерирует ретина-версии (@2x) для всех источников и собирает корректный`srcset`.129 - Сохраненный блок использует ту же логику рендера, что и функция `liteimage()`, поэтому сохраняется единое поведение на фронтенде.130 131 ### Проверка ретина-изображений (ручной smoke-тест)132 133 1. Включите плагин и загрузите изображение с любым расширением(JPEG/PNG/WebP).134 2. Включите опцию **Generate WebP thumbnails** (если доступна) и сохраните настройки.135 3. Вставьте изображение через`liteimage($attachment_id, ['thumb' => [1024, 0]])`.136 4. Откройте страницу с включённым `WP_DEBUG` и в консоли браузера запустите:124 - Add a **LiteImage Image**block in the Gutenberg editor. 125 - Specify a desktop and, if necessary, a mobile image. 126 - Set default sizes and custom breakpoints (*min-width*/*max-width*) to match your image sizes. 127 - Add any HTML attributes (`class`, `data-*`, `aria-*`, `loading`, `decoding`, etc.). 128 - The plugin automatically generates retina versions (@2x) for all sources and assembles the correct `srcset`. 129 - The saved block uses the same rendering logic as the `liteimage()` function, so it maintains consistent behavior on the frontend. 130 131 ### Checking retina images (manual smoke test) 132 133 1. Enable the plugin and upload an image with any extension (JPEG/PNG/WebP). 134 2. Enable the **Generate WebP thumbnails**option (if available) and save the settings. 135 3. Insert an image via `liteimage($attachment_id, ['thumb' => [1024, 0]])`. 136 4. Open a page with `WP_DEBUG` enabled and in the browser console run: 137 137 ```js 138 138 [...document.querySelectorAll('picture img')].forEach((img) => console.log(img.currentSrc, img.srcset)); 139 139 ``` 140 5. Убедитесь, что для каждого `<source>` и `<img>` присутствует `srcset` вида `... 1x, ... 2x`, а файлы с суффиксом `@2x` создаются даже для изображений меньше исходного.141 6. Очистите миниатюры через инструмент LiteImage Cleanup и проверьте, что файлы `@2x` удаляются из папки загрузок.140 5. Make sure that for each `<source>` and `<img>` there is a `srcset` of the form `... 1x, ... 2x`, and that files with the `@2x` suffix are created even for images smaller than the original. 141 6. Clean up your thumbnails using the LiteImage Cleanup tool and check that the `@2x` files are removed from your downloads folder. 142 142 143 143 ## 🎛️ Settings -
liteimage/tags/3.3.0/src/Admin/AdminPage.php
r3392396 r3392398 176 176 $rate_limit_key_wp = 'liteimage_cleanup_wp_' . $user_id; 177 177 178 // Таб навигация (4 flat таба)178 // Tab navigation (4 flat tabs) 179 179 $allowed_tabs = ['general', 'stats', 'webp', 'usage']; 180 180 $tab_labels = [ -
liteimage/trunk/README.md
r3392391 r3392398 122 122 ### Gutenberg Block 123 123 124 - Добавьте блок **LiteImage Image** в редакторе Гутенберга.125 - Укажите настольное и, при необходимости, мобильное изображение.126 - Настройте размеры по умолчанию и произвольные брейкпоинты (*min-width* / *max-width*), соответствующие размерам изображений.127 - Добавляйте любые HTML-атрибуты (`class`, `data-*`, `aria-*`, `loading`, `decoding`, и т.д.).128 - Плагин автоматически генерирует ретина-версии (@2x) для всех источников и собирает корректный`srcset`.129 - Сохраненный блок использует ту же логику рендера, что и функция `liteimage()`, поэтому сохраняется единое поведение на фронтенде.130 131 ### Проверка ретина-изображений (ручной smoke-тест)132 133 1. Включите плагин и загрузите изображение с любым расширением(JPEG/PNG/WebP).134 2. Включите опцию **Generate WebP thumbnails** (если доступна) и сохраните настройки.135 3. Вставьте изображение через`liteimage($attachment_id, ['thumb' => [1024, 0]])`.136 4. Откройте страницу с включённым `WP_DEBUG` и в консоли браузера запустите:124 - Add a **LiteImage Image**block in the Gutenberg editor. 125 - Specify a desktop and, if necessary, a mobile image. 126 - Set default sizes and custom breakpoints (*min-width*/*max-width*) to match your image sizes. 127 - Add any HTML attributes (`class`, `data-*`, `aria-*`, `loading`, `decoding`, etc.). 128 - The plugin automatically generates retina versions (@2x) for all sources and assembles the correct `srcset`. 129 - The saved block uses the same rendering logic as the `liteimage()` function, so it maintains consistent behavior on the frontend. 130 131 ### Checking retina images (manual smoke test) 132 133 1. Enable the plugin and upload an image with any extension (JPEG/PNG/WebP). 134 2. Enable the **Generate WebP thumbnails**option (if available) and save the settings. 135 3. Insert an image via `liteimage($attachment_id, ['thumb' => [1024, 0]])`. 136 4. Open a page with `WP_DEBUG` enabled and in the browser console run: 137 137 ```js 138 138 [...document.querySelectorAll('picture img')].forEach((img) => console.log(img.currentSrc, img.srcset)); 139 139 ``` 140 5. Убедитесь, что для каждого `<source>` и `<img>` присутствует `srcset` вида `... 1x, ... 2x`, а файлы с суффиксом `@2x` создаются даже для изображений меньше исходного.141 6. Очистите миниатюры через инструмент LiteImage Cleanup и проверьте, что файлы `@2x` удаляются из папки загрузок.140 5. Make sure that for each `<source>` and `<img>` there is a `srcset` of the form `... 1x, ... 2x`, and that files with the `@2x` suffix are created even for images smaller than the original. 141 6. Clean up your thumbnails using the LiteImage Cleanup tool and check that the `@2x` files are removed from your downloads folder. 142 142 143 143 ## 🎛️ Settings -
liteimage/trunk/src/Admin/AdminPage.php
r3392391 r3392398 176 176 $rate_limit_key_wp = 'liteimage_cleanup_wp_' . $user_id; 177 177 178 // Таб навигация (4 flat таба)178 // Tab navigation (4 flat tabs) 179 179 $allowed_tabs = ['general', 'stats', 'webp', 'usage']; 180 180 $tab_labels = [
Note: See TracChangeset
for help on using the changeset viewer.