DrQuincy Posted November 27, 2020 Share Posted November 27, 2020 I can see in the Page Edit Image config there is an option to stop Skip width attributes on image tags but although it doesn't set width="" on inserted images it does still allow the size to be set in the dialog. Also, if you resize it it creates a new image on the server: I basically don't want any image resizing doing and no variations created. So what I want ideally is these options hiding: I just want it as simple as possible and prefer to handle sizing outside of the editor (the Images field already uses client-size resizing). Is this possible? Link to comment Share on other sites More sharing options...
Zeka Posted November 27, 2020 Share Posted November 27, 2020 Hi @DrQuincy Not sure that this is the right way but you can hide this block via CSS, create custom permission and check it in the hook to ___executeResize() if the user has it. https://github.com/processwire/processwire/blob/master/wire/modules/Process/ProcessPageEditImageSelect/ProcessPageEditImageSelect.module#L1282 1 Link to comment Share on other sites More sharing options...
DrQuincy Posted December 1, 2020 Author Share Posted December 1, 2020 @Zeka Interesting, thanks! I think if I can hide the parts I obscured in red that would do it. Is it easy to add custom CSS to the back-end? Link to comment Share on other sites More sharing options...
kongondo Posted December 1, 2020 Share Posted December 1, 2020 1 hour ago, DrQuincy said: Is it easy to add custom CSS to the back-end? Yes. Link to comment Share on other sites More sharing options...
DrQuincy Posted December 1, 2020 Author Share Posted December 1, 2020 For anyone that is interested in doing the same this seems to have worked. Place this in admin.php, before the controller.php line: $config->styles->add('/assets/css/custom.css'); And then add this in your new custom.css file: form#selected_image_settings p#wrap_info span#action_icons span { display: none; } form#selected_image_settings p#wrap_info span#action_icons span#description_action { display: block; } span#selected_image_pixels, span#selected_image_checkboxes { display: none; } Now you just get the image description button. Make sure you check the Skip width attributes on image tags in the Page Edit Image config or set width and height to auto in your main site CSS. I will test it out a bit more but seems to be working fine for now. 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now