{% extends 'image-resizer/_layouts' %} {% import "_includes/forms" as forms %} {% import "image-resizer/_macros" as imageResizerMacro %} {% set crumbs = [ { label: "Image Resizer" | t('image-resizer'), url: url('image-resizer') }, { label: "Settings" | t('image-resizer'), url: url('image-resizer/settings') } ] %} {% set selectedTab = 'settings' %} {% set fullPageForm = true %} {% block blockContent %}
{{ csrfInput() }}
{% namespace 'settings' %} {% set additionalSettings = { sourceOptions: sourceOptions, } %}

{{ "All Asset Source Settings" | t('image-resizer') }}

{{ imageResizerMacro.resizeSetting(settings, additionalSettings) }} {{ forms.lightswitchField({ label: 'Skip larger resulting images' | t('image-resizer'), instructions: 'If the resizing process results in a larger image that the previous, do not replace with larger file.' | t('image-resizer'), id: 'skipLarger', name: 'skipLarger', on: settings.skipLarger, }) }} {{ forms.lightswitchField({ label: 'Non-destructive' | t('image-resizer'), instructions: 'Image Resizer will save a copy of your original image, untouched. This will be in a folder called `originals`, relative to the source image.' | t('image-resizer'), id: 'nonDestructiveResize', name: 'nonDestructiveResize', on: settings.nonDestructiveResize, }) }}
{% for item in sourceOptions %}

{{ "{label} Asset Source Settings" | t('image-resizer', { label: item.label }) }}

{{ imageResizerMacro.resizeSetting(settings, additionalSettings, item) }} {% endfor %}
{% js %} new Craft.ImageResizer.BulkResizeAssetFolder('{{ settings.imageWidth }}', '{{ settings.imageHeight }}'); new Craft.TabsManager(); {% endjs %} {% endnamespace %}
{% endblock %}