Turning off image optimization

Is there any way of turning off the ‘optimize’ on images globally, or at least set ‘optimize’ to false by default?

Ideally, I’d like to get rid of the ‘optimize’ checkbox as well but I don’t think that’s probably as easy to do with a custom app.

We have actually been doing something very similar in our custom app for a long time, but with different settings.

If the feature was complete, it might actually be useful for us, but currently it isn’t because so many things are hard-coded in it (which is bad practice) - namely the max width, max height and JPG quality.

frappe-bench/apps/frappe/frappe/public/js/frappe/FilePreview.vue remove these below lines
<input
type=“checkbox”
:checked=“optimize”
@change=“emit(‘toggle_optimize’)”
/>{{ __(“Optimize”) }}

2 Likes