Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

пересмотреть ресайз картинок в админке #46

Open
andreyryabin opened this issue May 14, 2024 · 0 comments

Comments

@andreyryabin
Copy link
Owner

andreyryabin commented May 14, 2024

проблема в
events/OnBeforeShowEditorBlocks.php

для каждого блока с картинкой надо описывать правило

if ($block['name'] == 'complex_image_text') {
                if (isset($block['image'])) {
                    $block['image']['file'] = Sprint\Editor\Tools\Image::resizeImage2(
                        $block['image']['file']['ID'], [
                            'width'  => ImageAdminBlock::PREVIEW_WIDTH,
                            'height' => ImageAdminBlock::PREVIEW_HEIGHT,
                            'exact'  => ImageAdminBlock::PREVIEW_EXACT,
                        ]
                    );
                }
            }

что создаёт проблему в комплексных блоках, для каждого из которых надо создавать новое правило

автор Ирина Кулыгина @design_lat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant