17 |
18 | {% include "image-optimize/settings/image-transforms/craft.twig" %}
19 |
--------------------------------------------------------------------------------
/src/templates/_includes/checkboxGroup.twig:
--------------------------------------------------------------------------------
1 | {# @var craft \craft\web\twig\variables\CraftVariable #}
2 | {#
3 | /**
4 | * Image Optimize plugin for Craft CMS
5 | *
6 | * Custom `checkboxGroup` input. Checkbox group doesn't allow access to checkbox, therefore we can't control the ID.
7 | * For this reason we use create the a custom `checkboxGroup` that will use Craft native checkboxes.
8 | *
9 | * @author nystudio107
10 | * @copyright Copyright (c) 2017 nystudio107
11 | * @link https://nystudio107.com
12 | * @package ImageOptimize
13 | * @since 1.5.6
14 | */
15 | #}
16 |
17 | {% import "_includes/forms" as forms %}
18 |
19 | {% if name is defined and name %}
20 |
21 | {% endif -%}
22 |
23 | {%- set options = (options is defined ? options : []) %}
24 | {%- set values = (values is defined ? values : []) %}
25 | {%- set name = (name is defined and name ? name~'[]' : null) %}
26 |
27 |
29 | {%- for key, option in options %}
30 | {%- if option is not iterable %}
31 | {%- set option = {label: option, value: key} %}
32 | {%- endif %}
33 |
34 | {{ forms.checkbox({
35 | id: (id is defined ? id ~ '-' ~ key : null),
36 | name: name,
37 | checked: (option.value is defined and option.value in values),
38 | autofocus: (autofocus is defined and autofocus and loop.first and not craft.app.request.isMobileBrowser(true))
39 | }|merge(option)) }}
40 |
ImageOptimize also comes with an OptimizedImages Field that you can add to an Asset
52 | Volume's layout. The OptimizedImages Field makes creating responsive image sizes for
53 | {{ '' |escape }} or {{ '' |escape }} elements
54 | sublimely easy.
55 |
These responsive image transforms are created when an asset is saved, rather than at page
56 | load time, to ensure that frontend performance is optimal.
57 |
58 |
59 |
60 |
61 | {{ forms.lightswitchField({
62 | label: "Create Color Palette"|t('image-optimize'),
63 | instructions: "Controls whether a dominant color palette should be created for image variants. It takes a bit of time, so if you never plan to use it, you can turn it off."|t('image-optimize'),
64 | 'id': 'createColorPalette',
65 | 'name': 'createColorPalette',
66 | 'on': settings.createColorPalette,
67 | 'warning': configWarning('createColorPalette', 'image-optimize')
68 | }) }}
69 |
70 | {% if not gdInstalled %}
71 |
72 |
You do not have the GD PHP extension installed, so placeholder silhouettes
73 | cannot be generated. An SVG box will be used instead.
74 |
75 | {% endif %}
76 | {{ forms.lightswitchField({
77 | label: "Create Placeholder Silhouettes"|t('image-optimize'),
78 | instructions: "Controls whether SVG placeholder silhouettes should be created for image variants. It takes a bit of time, so if you never plan to use them, you can turn it off."|t('image-optimize'),
79 | 'id': 'createPlaceholderSilhouettes',
80 | 'name': 'createPlaceholderSilhouettes',
81 | 'on': settings.createPlaceholderSilhouettes,
82 | 'warning': configWarning('createPlaceholderSilhouettes', 'image-optimize')
83 | }) }}
84 |
85 | {{ forms.lightswitchField({
86 | label: "Cap Placeholder Silhouette Size"|t('image-optimize'),
87 | instructions: "This option caps the placeholder silhouette SVG size to 32kB. If it's larger than that, a default SVG box is returned."|t('image-optimize'),
88 | 'id': 'capSilhouetteSvgSize',
89 | 'name': 'capSilhouetteSvgSize',
90 | 'on': settings.capSilhouetteSvgSize,
91 | 'warning': configWarning('capSilhouetteSvgSize', 'image-optimize')
92 | }) }}
93 |
94 | {{ forms.lightswitchField({
95 | label: "Lower Quality Retina Image Variants"|t('image-optimize'),
96 | instructions: "Controls whether retina images are automatically created with reduced quality. Learn more."|t('image-optimize') |raw,
97 | 'id': 'lowerQualityRetinaImageVariants',
98 | 'name': 'lowerQualityRetinaImageVariants',
99 | 'on': settings.lowerQualityRetinaImageVariants,
100 | 'warning': configWarning('lowerQualityRetinaImageVariants', 'image-optimize')
101 | }) }}
102 |
103 | {{ forms.lightswitchField({
104 | label: "Allow Up-Scaled Image Variants"|t('image-optimize'),
105 | instructions: "Controls whether Optimized Image Variants are created that would be up-scaled to be larger than the original source image."|t('image-optimize'),
106 | 'id': 'allowUpScaledImageVariants',
107 | 'name': 'allowUpScaledImageVariants',
108 | 'on': settings.allowUpScaledImageVariants,
109 | 'warning': configWarning('allowUpScaledImageVariants', 'image-optimize')
110 | }) }}
111 |
112 | {{ forms.lightswitchField({
113 | label: "Auto Sharpen Scaled Images"|t('image-optimize'),
114 | instructions: "Controls whether images scaled down >= 50% should be automatically sharpened."|t('image-optimize'),
115 | 'id': 'autoSharpenScaledImages',
116 | 'name': 'autoSharpenScaledImages',
117 | 'on': settings.autoSharpenScaledImages,
118 | 'warning': configWarning('autoSharpenScaledImages', 'image-optimize')
119 | }) }}
120 |
121 | {{ forms.textField({
122 | label: "Sharpen Image Percentage"|t("image-optimize"),
123 | instructions: "The amount an image needs to be scaled down for automatic sharpening to be applied."|t("image-optimize"),
124 | id: "sharpenScaledImagePercentage",
125 | name: "sharpenScaledImagePercentage",
126 | size: 5,
127 | maxlength: 5,
128 | value: settings.sharpenScaledImagePercentage,
129 | warning: configWarning("sharpenScaledImagePercentage", "image-optimize"),
130 | errors: settings.getErrors("sharpenScaledImagePercentage"),
131 | }) }}
132 |
133 | {{ forms.lightswitchField({
134 | label: "Limit by Sub-Folder"|t('image-optimize'),
135 | instructions: "Whether to allow limiting the creation of Optimized Image Variants for images by sub-folders."|t('image-optimize'),
136 | 'id': 'assetVolumeSubFolders',
137 | 'name': 'assetVolumeSubFolders',
138 | 'on': settings.assetVolumeSubFolders,
139 | 'warning': configWarning('assetVolumeSubFolders', 'image-optimize')
140 | }) }}
141 |
9 | The following ImageOptimize settings are not editable here; this is
10 | just an informational display.
11 | Instead copy the imageoptimize/config.php file to
12 | Craft's config/ directory, renaming it to image-optimize.php,
13 | and make your changes there to override default settings.
14 |
15 |
16 |
17 | {% if imageProcessors is defined and imageProcessors |length %}
18 |
{{ 'Active Image Processors' }}
19 |
20 |
21 |
22 |
{{ "File Format"|t('image-optimize') }}
24 |
{{ "Image Processor"|t('image-optimize') }}
26 |
{{ "Command"|t('image-optimize') }}
27 |
{{ "Installed"|t('image-optimize') }}
28 |
29 |
30 |
31 | {% for imageProcessor in imageProcessors %}
32 |
46 | {% endblock %}
47 |
48 | {% block foot %}
49 | {# include our JavaScript modules #}
50 | {{ parent() }}
51 | {% set tagOptions = {
52 | 'depends': [
53 | 'nystudio107\\imageoptimize\\assetbundles\\imageoptimize\\ImageOptimizeAsset'
54 | ],
55 | } %}
56 | {{ craft.imageOptimize.register('src/js/Welcome.js', false, tagOptions, tagOptions) }}
57 | {% endblock %}
58 |
--------------------------------------------------------------------------------
/src/translations/en/image-optimize.php:
--------------------------------------------------------------------------------
1 | 'does not exist',
18 | 'Original' => 'Original',
19 | 'Optimized' => 'Optimized',
20 | 'Savings' => 'Savings',
21 | 'Not Installed' => 'Not Installed',
22 | 'The aspectRatioX of the transformed images.' => 'The aspectRatioX of the transformed images.',
23 | 'The source domain to use for the imgix transforms.' => 'The source domain to use for the imgix transforms.',
24 | 'The additional retina sizes that should be created for this variant.' => 'The additional retina sizes that should be created for this variant.',
25 | 'Variant Creator' => 'Variant Creator',
26 | 'The width of the optimized image variant in pixels. This should match your `@media` query breakpoints.' => 'The width of the optimized image variant in pixels. This should match your `@media` query breakpoints.',
27 | 'Focal Point not set' => 'Focal Point not set',
28 | 'Failed to create image variant at: ' => 'Failed to create image variant at: ',
29 | 'The aspectRatioY of the transformed images.' => 'The aspectRatioY of the transformed images.',
30 | 'This image is upscaled' => 'This image is upscaled',
31 | 'Retina Sizes' => 'Retina Sizes',
32 | 'Choose from Craft native transforms or an image transform service to handle your image transforms site-wide.' => 'Choose from Craft native transforms or an image transform service to handle your image transforms site-wide.',
33 | 'Craft' => 'Craft',
34 | 'imgix' => 'imgix',
35 | '{name} plugin loaded' => '{name} plugin loaded',
36 | 'Transform Method' => 'Transform Method',
37 | 'Variant' => 'Variant',
38 | 'File Format' => 'File Format',
39 | 'Image Processor' => 'Image Processor',
40 | 'The quality of the optimized image variant.' => 'The quality of the optimized image variant.',
41 | 'Command' => 'Command',
42 | 'Installed' => 'Installed',
43 | 'Focal Point set' => 'Focal Point set',
44 | 'Started resaveAsset queue job id: {jobId} Element id: {elementId}' => 'Started resaveAsset queue job id: {jobId} Element id: {elementId}',
45 | 'Started resaveVolumeAssets queue job id: {jobId}' => 'Started resaveVolumeAssets queue job id: {jobId}',
46 | 'Controls whether Optimized Image Variants are created that would be up-scaled to be larger than the original source image.' => 'Controls whether Optimized Image Variants are created that would be up-scaled to be larger than the original source image.',
47 | 'Optimizing images in {name}' => 'Optimizing images in {name}',
48 | 'The optional [security token](https://docs.imgix.com/setup/securing-images) used to sign image URLs from imgix.' => 'The optional [security token](https://docs.imgix.com/setup/securing-images) used to sign image URLs from imgix.',
49 | 'Controls whether retina images are automatically created with reduced quality as per here.' => 'Controls whether retina images are automatically created with reduced quality as per here.',
50 | 'Display Optimized Image Variants' => 'Display Optimized Image Variants',
51 | 'Controls whether images scaled down >= 50% should be automatically sharpened.' => 'Controls whether images scaled down >= 50% should be automatically sharpened.',
52 | 'Controls whether SVG placeholder silhouettes should be created for image variants. It takes a bit of time, so if you never plan to use them, you can turn it off.' => 'Controls whether SVG placeholder silhouettes should be created for image variants. It takes a bit of time, so if you never plan to use them, you can turn it off.',
53 | 'Controls whether the optimized image variants will be displayed in the Edit Asset HUD.' => 'Controls whether the optimized image variants will be displayed in the Edit Asset HUD.',
54 | 'Optimizing image id {id}' => 'Optimizing image id {id}',
55 | 'Auto Sharpen Scaled Images' => 'Auto Sharpen Scaled Images',
56 | 'Display Dominant Color Palette' => 'Display Dominant Color Palette',
57 | 'Image transform >= 50%, sharpened the transformed image: {name}' => 'Image transform >= 50%, sharpened the transformed image: {name}',
58 | 'Controls whether the dominant color palette will be displayed in the Edit Asset HUD.' => 'Controls whether the dominant color palette will be displayed in the Edit Asset HUD.',
59 | 'Create Placeholder Silhouettes' => 'Create Placeholder Silhouettes',
60 | 'Display LazyLoad Placeholder Images' => 'Display LazyLoad Placeholder Images',
61 | 'Controls whether a dominant color palette should be created for image variants. It takes a bit of time, so if you never plan to use it, you can turn it off.' => 'Controls whether a dominant color palette should be created for image variants. It takes a bit of time, so if you never plan to use it, you can turn it off.',
62 | 'Create Color Palette' => 'Create Color Palette',
63 | 'The API key to use for the imgix transforms (needed for auto-purging changed assets).' => 'The API key to use for the imgix transforms (needed for auto-purging changed assets).',
64 | 'Controls whether the lazy load placeholder images will be displayed in the Edit Asset HUD.' => 'Controls whether the lazy load placeholder images will be displayed in the Edit Asset HUD.',
65 | 'Lower Quality Retina Image Variants' => 'Lower Quality Retina Image Variants',
66 | 'Allow Up-Scaled Image Variants' => 'Allow Up-Scaled Image Variants',
67 | 'Manifest file not found at: {manifestPath}' => 'Manifest file not found at: {manifestPath}',
68 | 'Don\'t create image transforms for files that are of the following types:' => 'Don\'t create image transforms for files that are of the following types:',
69 | 'Ignore Files' => 'Ignore Files',
70 | 'GIF' => 'GIF',
71 | 'The optional [security key](https://thumbor.readthedocs.io/en/latest/security.html) used by Thumbor to create secure image urls.' => 'The optional [security key](https://thumbor.readthedocs.io/en/latest/security.html) used by Thumbor to create secure image urls.',
72 | 'SVG' => 'SVG',
73 | 'The base URL to use for the Thumbor transforms.' => 'The base URL to use for the Thumbor transforms.',
74 | 'Module does not exist in the manifest: {moduleName}' => 'Module does not exist in the manifest: {moduleName}',
75 | 'Thumbor' => 'Thumbor',
76 | 'Optionally prefix your asset path with the bucket name. This is useful if your Thumbor configuration does not specify an explicit bucket. Only relevant for AWS S3 volumes at this time.' => 'Optionally prefix your asset path with the bucket name. This is useful if your Thumbor configuration does not specify an explicit bucket. Only relevant for AWS S3 volumes at this time.',
77 | 'Object failed to validate' => 'Object failed to validate',
78 | 'Is not a Model object.' => 'Is not a Model object.',
79 | 'Generic Transform' => 'Generic Transform',
80 | 'Placeholder Silhouette' => 'Placeholder Silhouette',
81 | 'OptimizedImages fields only work when added to an Asset Volume\'s layout.' => 'OptimizedImages fields only work when added to an Asset Volume\'s layout.',
82 | 'Sharp' => 'Sharp',
83 | 'Placeholder Box' => 'Placeholder Box',
84 | 'Create Optimized Image Variants for images in the sub-folders:' => 'Create Optimized Image Variants for images in the sub-folders:',
85 | 'LazyLoad Placeholder Images:' => 'LazyLoad Placeholder Images:',
86 | 'Dominant Color Palette:' => 'Dominant Color Palette:',
87 | 'Color Palette not extracted' => 'Color Palette not extracted',
88 | 'Optimized Image Variants:' => 'Optimized Image Variants:',
89 | 'Placeholder Image' => 'Placeholder Image',
90 | 'The base URL to use for the Sharp transform service. If Sharp is being used via [AWS Serverless Image Handler](https://aws.amazon.com/solutions/serverless-image-handler/), this is your \'Image handler distribution\' CloudFront distribution URL.' => 'The base URL to use for the Sharp transform service. If Sharp is being used via [AWS Serverless Image Handler](https://aws.amazon.com/solutions/serverless-image-handler/), this is your \'Image handler distribution\' CloudFront distribution URL.',
91 | 'Lightness:' => 'Lightness:',
92 | 'Add Variant' => 'Add Variant',
93 | 'Imgix' => 'Imgix',
94 | 'The source domain to use for the Imgix transforms.' => 'The source domain to use for the Imgix transforms.',
95 | 'Whether to allow limiting the creation of Optimized Image Variants for images by sub-folders.' => 'Whether to allow limiting the creation of Optimized Image Variants for images by sub-folders.',
96 | 'The API key to use for the Imgix transforms (needed for auto-purging changed assets).' => 'The API key to use for the Imgix transforms (needed for auto-purging changed assets).',
97 | 'The optional [security token](https://docs.imgix.com/setup/securing-images) used to sign image URLs from Imgix.' => 'The optional [security token](https://docs.imgix.com/setup/securing-images) used to sign image URLs from Imgix.',
98 | 'ImageOptimize Info' => 'ImageOptimize Info',
99 | 'Limit by Sub-Folder' => 'Limit by Sub-Folder',
100 | 'Cap Placeholder Silhouette Size' => 'Cap Placeholder Silhouette Size',
101 | 'The amount of sharpening that should be applied if an image is scaled down more than 50% via the [USM parameter](https://docs.imgix.com/apis/rendering/adjustment/usm).' => 'The amount of sharpening that should be applied if an image is scaled down more than 50% via the [USM parameter](https://docs.imgix.com/apis/rendering/adjustment/usm).',
102 | 'Error rendering template string -> {error}' => 'Error rendering template string -> {error}',
103 | 'The amount an image needs to be scaled down for automatic sharpening to be applied.' => 'The amount an image needs to be scaled down for automatic sharpening to be applied.',
104 | 'Error rendering `{template}` -> {error}' => 'Error rendering `{template}` -> {error}',
105 | 'This option caps the placeholder silhouette SVG size to 32Kb. If it\'s larger than that, a default SVG box is returned.' => 'This option caps the placeholder silhouette SVG size to 32Kb. If it\'s larger than that, a default SVG box is returned.',
106 | 'This option caps the placeholder silhouette SVG size to 32kB. If it\'s larger than that, a default SVG box is returned.' => 'This option caps the placeholder silhouette SVG size to 32kB. If it\'s larger than that, a default SVG box is returned.',
107 | 'Controls whether retina images are automatically created with reduced quality. Learn more.' => 'Controls whether retina images are automatically created with reduced quality. Learn more.',
108 | 'Sharpen Image Percentage' => 'Sharpen Image Percentage',
109 | ];
110 |
--------------------------------------------------------------------------------
/src/utilities/ImageOptimizeUtility.php:
--------------------------------------------------------------------------------
1 | optimize->getActiveImageProcessors();
68 | $variantCreators = ImageOptimize::$plugin->optimize->getActiveVariantCreators();
69 |
70 | return Craft::$app->getView()->renderTemplate(
71 | 'image-optimize/_components/utilities/ImageOptimizeUtility_content',
72 | [
73 | 'imageProcessors' => $imageProcessors,
74 | 'variantCreators' => $variantCreators,
75 | ]
76 | );
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/src/validators/EmbeddedModelValidator.php:
--------------------------------------------------------------------------------
1 | $attribute;
34 |
35 | if (!empty($value) && $value instanceof Model) {
36 | if (!$value->validate()) {
37 | $errors = $value->getErrors();
38 | foreach ($errors as $attributeError => $valueErrors) {
39 | /** @var array $valueErrors */
40 | foreach ($valueErrors as $valueError) {
41 | $model->addError(
42 | $attribute,
43 | Craft::t('image-optimize', 'Object failed to validate')
44 | . '-' . $attributeError . ' - ' . $valueError
45 | );
46 | }
47 | }
48 | }
49 | } else {
50 | $model->addError($attribute, Craft::t('image-optimize', 'Is not a Model object.'));
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/variables/ImageOptimizeVariable.php:
--------------------------------------------------------------------------------
1 | optimize->renderLazySizesFallbackJs($scriptAttrs, $variables));
45 | }
46 |
47 | /**
48 | * Render the LazySizes JS
49 | *
50 | * @param array $scriptAttrs
51 | * @param array $variables
52 | * @return Markup
53 | */
54 | public function renderLazySizesJs(array $scriptAttrs = [], array $variables = []): Markup
55 | {
56 | return Template::raw(ImageOptimize::$plugin->optimize->renderLazySizesJs($scriptAttrs, $variables));
57 | }
58 |
59 | /**
60 | * Return an SVG box as a placeholder image
61 | *
62 | * @param $width
63 | * @param $height
64 | * @param ?string $color
65 | *
66 | * @return Markup
67 | */
68 | public function placeholderBox($width, $height, ?string $color = null): Markup
69 | {
70 | return Template::raw(ImageOptimize::$plugin->placeholder->generatePlaceholderBox($width, $height, $color));
71 | }
72 |
73 | /**
74 | * @param Asset $asset
75 | * @param ?array $variants
76 | * @param bool $generatePlaceholders
77 | *
78 | * @return ?OptimizedImage
79 | * @throws InvalidConfigException
80 | */
81 | public function createOptimizedImages(
82 | Asset $asset,
83 | ?array $variants = null,
84 | bool $generatePlaceholders = false,
85 | ): ?OptimizedImage {
86 | // Override our settings for lengthy operations, since we're doing this via Twig
87 | ImageOptimize::$generatePlaceholders = $generatePlaceholders;
88 |
89 | return ImageOptimize::$plugin->optimizedImages->createOptimizedImages($asset, $variants);
90 | }
91 |
92 | /**
93 | * Returns whether `.webp` is a format supported by the server
94 | *
95 | * @return bool
96 | */
97 | public function serverSupportsWebP(): bool
98 | {
99 | return ImageOptimize::$plugin->optimize->serverSupportsWebP();
100 | }
101 |
102 | /**
103 | * Creates an Image Transform with a given config.
104 | *
105 | * @param mixed $config The Image Transform’s class name, or its config,
106 | * with a `type` value and optionally a `settings` value
107 | *
108 | * @return ?ImageTransformInterface The Image Transform
109 | */
110 | public function createImageTransformType($config): ?ImageTransformInterface
111 | {
112 | return ImageOptimize::$plugin->optimize->createImageTransformType($config);
113 | }
114 |
115 | /**
116 | * Return whether we are running Craft 3.1 or later
117 | *
118 | * @return bool
119 | */
120 | public function craft31(): bool
121 | {
122 | return true;
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/src/web/assets/dist/assets/field-D_XkB3eu.js:
--------------------------------------------------------------------------------
1 | function u(t,e=!1,n=1){const o=e?1e3:1024;if(Math.abs(t)=o&&s0){const n=performance.getEntriesByName(e)[0];if(typeof n<"u"){const o=t.parentNode.parentNode.parentNode.nextElementSibling.querySelector(".io-file-size");o&&(o.innerHTML=u(n.decodedBodySize,!0))}}}(function(t,e,n){const o="ImageOptimizeOptimizedImages",a={};function s(i,r){this.element=i,this.options=t.extend({},a,r),this._defaults=a,this._name=o,this.init()}s.prototype={init:function(){t(function(){const i=n.querySelectorAll("img.io-preview-image");for(const r of i)r.complete?d(r):r.addEventListener("load",c=>{d(c.target)})})}},t.fn[o]=function(i){return this.each(function(){t.data(this,"plugin_"+o)||t.data(this,"plugin_"+o,new s(this,i))})}})($,window,document);Craft.OptimizedImagesInput=Garnish.Base.extend({id:null,inputNamePrefix:null,inputIdPrefix:null,$container:null,$blockContainer:null,$addBlockBtnContainer:null,$addBlockBtnGroup:null,$addBlockBtnGroupBtns:null,blockSort:null,blockSelect:null,init:function(t,e){this.id=t,this.inputNamePrefix=e,this.inputIdPrefix=Craft.formatInputId(this.inputNamePrefix),this.$container=$("#"+this.id),this.$blockContainer=this.$container.children(".variant-blocks"),this.$addBlockBtnContainer=this.$container.children(".buttons"),this.$addBlockBtnGroup=this.$addBlockBtnContainer.children(".btngroup"),this.$addBlockBtnGroupBtns=this.$addBlockBtnGroup.children(".btn"),this.$blockContainer.find("> > .actions > .settings").each((o,a)=>{const s=$(a);let i;s.data("menubtn")?i=s.data("menubtn"):i=new Garnish.MenuBtn(a),i.menu.settings.onOptionSelect=$.proxy(function(r){this.onMenuOptionSelect(r,i)},this)});const n=this.$blockContainer.children();this.blockSort=new Garnish.DragSort(n,{handle:"> .actions > .move",axis:"y",collapseDraggees:!0,magnetStrength:4,helperLagBase:1.5,helperOpacity:.9,onSortChange:$.proxy(function(){this.resetVariantBlockOrder()},this)}),this.addListener(this.$addBlockBtnGroupBtns,"click",function(){this.addVariantBlock(null)}),this.addAspectRatioHandlers(),this.reIndexVariants()},onMenuOptionSelect:function(t,e){const n=$(t),o=e.$btn.closest(".matrixblock");switch(n.data("action")){case"add":{this.addVariantBlock(o);break}case"delete":{n.hasClass("disabled")||this.deleteVariantBlock(o);break}}},getHiddenBlockCss:function(t){return{opacity:0,marginBottom:-t.outerHeight()}},reIndexVariants:function(){this.$blockContainer=this.$container.children(".variant-blocks");const t=this.$blockContainer.children();t.each(function(n,o){const a=n,i=$(o).find("div .field, label, input, select");$(i).each(function(r,c){let l=$(c).attr("id");l&&(l=l.replace(/-([0-9]+)-/g,"-"+a+"-"),$(c).attr("id",l)),l=$(c).attr("for"),l&&(l=l.replace(/-([0-9]+)-/g,"-"+a+"-"),$(c).attr("for",l)),l=$(c).attr("name"),l&&(l=l.replace(/\[([0-9]+)]/g,"["+a+"]"),$(c).attr("name",l))})});let e=!1;t.length==1&&(e=!0),t.find("> .actions > .settings").each(function(n,o){const a=$(o);let s;if(a.data("menubtn")&&(s=a.data("menubtn"),typeof s.menu.$options<"u")){let i=$(s.menu.$options[1]);typeof i<"u"&&(e?i.addClass("disabled").disable():i.removeClass("disabled").enable())}})},addAspectRatioHandlers:function(){this.addListener($(".lightswitch"),"click",function(t){$(t.target).closest(".matrixblock").find(".io-aspect-ratio-wrapper").slideToggle()}),this.addListener($(".io-select-ar-box"),"click",function(t){const e=$(t.target);let n=$(t.target).data("x"),o=$(t.target).data("y"),a=$(t.target).data("custom"),s,i;i=e.closest(".matrixblock"),i.find(".io-select-ar-box").each(function(r,c){$(c).removeClass("io-selected-ar-box")}),e.addClass("io-selected-ar-box"),a?i.find(".io-custom-ar-wrapper").slideDown():(i.find(".io-custom-ar-wrapper").slideUp(),s=i.find("input")[2],$(s).val(n),s=i.find("input")[3],$(s).val(o))})},addVariantBlock:function(t){let e=$(this.$blockContainer.children()[0]).clone();e.find(".io-select-ar-box").each((o,a)=>{o===0?$(a).addClass("io-selected-ar-box"):$(a).removeClass("io-selected-ar-box")}),e.find(".io-custom-ar-wrapper").hide();let n=e.find("input")[0];$(n).val(1200),n=e.find("input")[1],$(n).val(1),n=e.find("input")[2],$(n).val(16),n=e.find("input")[3],$(n).val(9),n=e.find("select")[0],$(n).val(82),n=e.find("select")[1],$(n).val("jpg"),e.css(this.getHiddenBlockCss(e)).velocity({opacity:1,"margin-bottom":10},"fast",$.proxy(function(){t?e.insertBefore(t):e.appendTo(this.$blockContainer),this.blockSort.addItems(e),this.addAspectRatioHandlers(),e.find(".settings").each((o,a)=>{let s=$(a),i,r;r=this.$container.find(".io-menu-clone > .menu").clone(),$(r).insertAfter(s),i=new Garnish.MenuBtn(a),i.menu.settings.onOptionSelect=$.proxy(function(c){this.onMenuOptionSelect(c,i)},this)}),this.reIndexVariants()},this))},deleteVariantBlock:function(t){t.velocity(this.getHiddenBlockCss(t),"fast",$.proxy(()=>{t.remove(),this.reIndexVariants()},this))},resetVariantBlockOrder:function(){this.reIndexVariants()}});$(document).ready(function(){const t=new CustomEvent("vite-script-loaded",{detail:{path:"../src/web/assets/src/js/OptimizedImagesField.js"}});document.dispatchEvent(t)});
2 | //# sourceMappingURL=field-D_XkB3eu.js.map
3 |
--------------------------------------------------------------------------------
/src/web/assets/dist/assets/field-D_XkB3eu.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nystudio107/craft-imageoptimize/77cfa09fc779ee77be376603f66f92e1283df0eb/src/web/assets/dist/assets/field-D_XkB3eu.js.gz
--------------------------------------------------------------------------------
/src/web/assets/dist/assets/field-D_XkB3eu.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"field-D_XkB3eu.js","sources":["../../../../../buildchain/src/js/OptimizedImagesField.js"],"sourcesContent":["/* global $ */\n/* global Craft */\n/* global Garnish */\n\n/**\n * Image Optimize plugin for Craft CMS\n *\n * OptimizedImages Field JS\n *\n * @author nystudio107\n * @copyright Copyright (c) 2017 nystudio107\n * @link https://nystudio107.com\n * @package ImageOptimize\n * @since 1.2.0\n */\n\n/**\n * Convert the passed in bytes into a human readable format\n *\n * @param bytes\n * @param si\n * @param dp\n * @returns {string}\n */\nfunction humanFileSize(bytes, si = false, dp = 1) {\n const thresh = si ? 1000 : 1024;\n\n if (Math.abs(bytes) < thresh) {\n return bytes + ' B';\n }\n\n const units = si\n ? ['kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']\n : ['KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'];\n let u = -1;\n const r = 10 ** dp;\n\n do {\n bytes /= thresh;\n ++u;\n } while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1);\n\n\n return bytes.toFixed(dp) + ' ' + units[u];\n}\n\n/**\n * After an image has loaded, query the performance API for the decodedBodySize\n *\n * @param image\n */\nfunction imageLoaded(image) {\n const url = image.src || image.href;\n if (url && url.length > 0) {\n const iTime = performance.getEntriesByName(url)[0];\n if (typeof iTime !== \"undefined\") {\n const elem = image.parentNode.parentNode.parentNode.nextElementSibling.querySelector('.io-file-size');\n if (elem) {\n elem.innerHTML = humanFileSize(iTime.decodedBodySize, true);\n }\n }\n }\n}\n\n(function ($, window, document) {\n\n const pluginName = \"ImageOptimizeOptimizedImages\",\n defaults = {};\n\n // Plugin constructor\n function Plugin(element, options) {\n this.element = element;\n\n this.options = $.extend({}, defaults, options);\n\n this._defaults = defaults;\n this._name = pluginName;\n\n this.init();\n }\n\n Plugin.prototype = {\n\n init: function () {\n $(function () {\n\n /* -- _this.options gives us access to the $jsonVars that our FieldType passed down to us */\n\n const images = document.querySelectorAll(\"img.io-preview-image\");\n for (const image of images) {\n if (image.complete) {\n imageLoaded(image);\n } else {\n image.addEventListener('load', (event) => {\n imageLoaded(event.target);\n });\n }\n }\n });\n }\n };\n\n // A really lightweight plugin wrapper around the constructor,\n // preventing against multiple instantiations\n $.fn[pluginName] = function (options) {\n return this.each(function () {\n if (!$.data(this, \"plugin_\" + pluginName)) {\n $.data(this, \"plugin_\" + pluginName,\n new Plugin(this, options));\n }\n });\n };\n\n})($, window, document);\n\nCraft.OptimizedImagesInput = Garnish.Base.extend(\n {\n id: null,\n inputNamePrefix: null,\n inputIdPrefix: null,\n\n $container: null,\n $blockContainer: null,\n $addBlockBtnContainer: null,\n $addBlockBtnGroup: null,\n $addBlockBtnGroupBtns: null,\n\n blockSort: null,\n blockSelect: null,\n\n init: function (id, inputNamePrefix) {\n this.id = id;\n this.inputNamePrefix = inputNamePrefix;\n this.inputIdPrefix = Craft.formatInputId(this.inputNamePrefix);\n\n this.$container = $('#' + this.id);\n this.$blockContainer = this.$container.children('.variant-blocks');\n this.$addBlockBtnContainer = this.$container.children('.buttons');\n this.$addBlockBtnGroup = this.$addBlockBtnContainer.children('.btngroup');\n this.$addBlockBtnGroupBtns = this.$addBlockBtnGroup.children('.btn');\n\n // Create our action button menus\n this.$blockContainer.find('> > .actions > .settings').each((index, value) => {\n const $value = $(value);\n let menuBtn;\n if ($value.data('menubtn')) {\n menuBtn = $value.data('menubtn');\n } else {\n menuBtn = new Garnish.MenuBtn(value);\n }\n menuBtn.menu.settings.onOptionSelect = $.proxy(function (option) {\n this.onMenuOptionSelect(option, menuBtn);\n }, this);\n });\n\n const $blocks = this.$blockContainer.children();\n\n this.blockSort = new Garnish.DragSort($blocks, {\n handle: '> .actions > .move',\n axis: 'y',\n collapseDraggees: true,\n magnetStrength: 4,\n helperLagBase: 1.5,\n helperOpacity: 0.9,\n onSortChange: $.proxy(function () {\n this.resetVariantBlockOrder();\n }, this)\n });\n\n this.addListener(this.$addBlockBtnGroupBtns, 'click', function () {\n this.addVariantBlock(null);\n });\n\n this.addAspectRatioHandlers();\n this.reIndexVariants();\n },\n\n onMenuOptionSelect: function (option, menuBtn) {\n const $option = $(option);\n const container = menuBtn.$btn.closest('.matrixblock');\n\n switch ($option.data('action')) {\n case 'add': {\n this.addVariantBlock(container);\n break;\n }\n case 'delete': {\n if (!$option.hasClass('disabled')) {\n this.deleteVariantBlock(container);\n }\n break;\n }\n }\n },\n\n getHiddenBlockCss: function ($block) {\n return {\n opacity: 0,\n marginBottom: -($block.outerHeight())\n };\n },\n\n // Re-index all of the variant blocks\n reIndexVariants: function () {\n this.$blockContainer = this.$container.children('.variant-blocks');\n const $blocks = this.$blockContainer.children();\n $blocks.each(function (index, value) {\n const variantIndex = index;\n const $value = $(value);\n const elements = $value.find('div .field, label, input, select');\n\n // Re-index all of the element attributes\n $(elements).each(function (index, value) {\n // id attributes\n let str = $(value).attr('id');\n if (str) {\n str = str.replace(/-([0-9]+)-/g, \"-\" + variantIndex + \"-\");\n $(value).attr('id', str);\n }\n // for attributes\n str = $(value).attr('for');\n if (str) {\n str = str.replace(/-([0-9]+)-/g, \"-\" + variantIndex + \"-\");\n $(value).attr('for', str);\n }\n // Name attributes\n str = $(value).attr('name');\n if (str) {\n str = str.replace(/\\[([0-9]+)]/g, \"[\" + variantIndex + \"]\");\n $(value).attr('name', str);\n }\n });\n });\n let disabledDeleteItem = false;\n // If we only have one block, don't allow it to be deleted\n if ($blocks.length == 1) {\n disabledDeleteItem = true;\n }\n $blocks.find('> .actions > .settings').each(function (index, value) {\n const $value = $(value);\n let menuBtn;\n if ($value.data('menubtn')) {\n menuBtn = $value.data('menubtn');\n if (typeof menuBtn.menu.$options !== \"undefined\") {\n let menuItem = $(menuBtn.menu.$options[1]);\n if (typeof menuItem !== \"undefined\") {\n if (disabledDeleteItem) {\n menuItem.addClass('disabled').disable();\n } else {\n menuItem.removeClass('disabled').enable();\n }\n }\n }\n }\n });\n },\n\n addAspectRatioHandlers: function () {\n this.addListener($('.lightswitch'), 'click', function (ev) {\n const $target = $(ev.target);\n const $block = $target.closest('.matrixblock');\n $block.find('.io-aspect-ratio-wrapper').slideToggle();\n });\n this.addListener($('.io-select-ar-box'), 'click', function (ev) {\n const $target = $(ev.target);\n let x = $(ev.target).data('x'),\n y = $(ev.target).data('y'),\n custom = $(ev.target).data('custom'),\n field, $block;\n // Select the appropriate aspect ratio\n $block = $target.closest('.matrixblock');\n $block.find('.io-select-ar-box').each(function (index, value) {\n $(value).removeClass('io-selected-ar-box');\n });\n $target.addClass('io-selected-ar-box');\n\n // Handle setting the actual field values\n if (custom) {\n $block.find('.io-custom-ar-wrapper').slideDown();\n } else {\n $block.find('.io-custom-ar-wrapper').slideUp();\n field = $block.find('input')[2];\n $(field).val(x);\n field = $block.find('input')[3];\n $(field).val(y);\n }\n });\n },\n\n addVariantBlock: function (container) {\n let $block = $(this.$blockContainer.children()[0]).clone();\n // Reset to default values\n $block.find('.io-select-ar-box').each((index, value) => {\n if (index === 0) {\n $(value).addClass('io-selected-ar-box');\n } else {\n $(value).removeClass('io-selected-ar-box');\n }\n });\n $block.find('.io-custom-ar-wrapper').hide();\n let field = $block.find('input')[0];\n $(field).val(1200);\n field = $block.find('input')[1];\n $(field).val(1);\n field = $block.find('input')[2];\n $(field).val(16);\n field = $block.find('input')[3];\n $(field).val(9);\n field = $block.find('select')[0];\n $(field).val(82);\n field = $block.find('select')[1];\n $(field).val('jpg');\n $block.css(this.getHiddenBlockCss($block)).velocity({\n opacity: 1,\n 'margin-bottom': 10\n }, 'fast', $.proxy(function () {\n // Insert the block in the right place\n if (container) {\n $block.insertBefore(container);\n } else {\n $block.appendTo(this.$blockContainer);\n }\n // Update the Garnish UI controls\n this.blockSort.addItems($block);\n this.addAspectRatioHandlers();\n $block.find('.settings').each((index, value) => {\n let $value = $(value),\n menuBtn,\n menu;\n\n menu = this.$container.find('.io-menu-clone > .menu').clone();\n $(menu).insertAfter($value);\n menuBtn = new Garnish.MenuBtn(value);\n\n menuBtn.menu.settings.onOptionSelect = $.proxy(function (option) {\n this.onMenuOptionSelect(option, menuBtn);\n }, this);\n });\n this.reIndexVariants();\n }, this));\n },\n\n deleteVariantBlock: function (container) {\n container.velocity(this.getHiddenBlockCss(container), 'fast', $.proxy(() => {\n container.remove();\n this.reIndexVariants();\n }, this));\n },\n\n resetVariantBlockOrder: function () {\n this.reIndexVariants();\n }\n });\n\n// Accept HMR as per: https://vitejs.dev/guide/api-hmr.html\nif (import.meta.hot) {\n import.meta.hot.accept(() => {\n console.log(\"HMR\")\n });\n}\n\n// Re-broadcast the custom `vite-script-loaded` event so that we know that this module has loaded\n// Needed because when \n","import Vue from 'vue';\nimport ConfettiParty from '@/vue/ConfettiParty.vue';\n\nnew Vue({\n el: \"#cp-nav-content\",\n components: {\n ConfettiParty,\n },\n});\n\n// Accept HMR as per: https://vitejs.dev/guide/api-hmr.html\nif (import.meta.hot) {\n import.meta.hot.accept(() => {\n console.log(\"HMR\")\n });\n}\n"],"names":["t","i","module","this","n","e","s","a","o","r","h","c","Vue","VueConfetti","_sfc_main","ConfettiParty"],"mappings":"gLAAC,SAASA,EAAEC,EAAE,CAAmDC,UAAeD,EAAC,CAAgI,GAAEE,EAAK,UAAU,CAAC,OAAO,SAASH,EAAE,CAAC,SAASC,EAAEG,EAAE,CAAC,GAAGC,EAAED,CAAC,EAAE,OAAOC,EAAED,CAAC,EAAE,QAAQ,IAAIE,EAAED,EAAED,CAAC,EAAE,CAACA,EAAI,EAAE,GAAG,QAAQ,CAAE,CAAA,EAAE,OAAOJ,EAAEI,CAAC,EAAE,KAAKE,EAAE,QAAQA,EAAEA,EAAE,QAAQL,CAAC,EAAEK,EAAE,EAAE,GAAGA,EAAE,OAAO,CAAC,IAAID,EAAE,GAAG,OAAOJ,EAAE,EAAED,EAAEC,EAAE,EAAEI,EAAEJ,EAAE,EAAE,SAASD,EAAEK,EAAED,EAAE,CAACH,EAAE,EAAED,EAAEK,CAAC,GAAG,OAAO,eAAeL,EAAEK,EAAE,CAAC,aAAa,GAAG,WAAW,GAAG,IAAID,CAAC,CAAC,CAAC,EAAEH,EAAE,EAAE,SAASD,EAAE,CAAC,IAAIK,EAAEL,GAAGA,EAAE,WAAW,UAAU,CAAC,OAAOA,EAAE,OAAO,EAAE,UAAU,CAAC,OAAOA,CAAC,EAAE,OAAOC,EAAE,EAAEI,EAAE,IAAIA,CAAC,EAAEA,CAAC,EAAEJ,EAAE,EAAE,SAASD,EAAEC,EAAE,CAAC,OAAO,OAAO,UAAU,eAAe,KAAKD,EAAEC,CAAC,CAAC,EAAEA,EA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AU,CAAC,KAAK,IAAI,UAAU,KAAK,MAAM,KAAK,IAAI,UAAS,EAAG,KAAK,IAAI,aAAa,KAAK,IAAI,KAAK,SAAS,EAAE,KAAK,IAAI,KAAK,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,EAAa,KAAK,QAAhB,SAAsB,KAAK,WAAY,EAAU,KAAK,QAAd,OAAoB,KAAK,SAAU,EAAW,KAAK,QAAf,SAAsB,KAAK,UAAW,CAAA,CAAC,CAAC,CAAC,EAAED,CAAC,IAAIC,EAAE,EAAEM,CAAC,CAAC,CAAC,CAAC,CAAC,2LCK1vO,MAAAK,EAAA,OAAA,IAGAA,EAAA,IAAAC,CAAA,EAEA,MAAAC,EAAAF,EAAA,OAAA,CACA,QAAA,UAAA,CACA,KAAA,UAAA,MAAA,CACA,MAAA,OACA,OAAA,CAAA,aAAA,YAAA,OAAA,OAAA,YAAA,YAAA,SAAA,YAAA,YAAA,aAAA,YAAA,SAAA,CACA,CAAA,EACA,WAAA,IAAA,CACA,KAAA,UAAA,KAAA,CACA,EAAA,GAAA,CACA,EACA,QAAA,CAAA,CACA,CAAA,mHCrBAA,EAAA,OAAA,IAGA,IAAIA,EAAI,CACN,GAAI,kBACJ,WAAY,CACV,cAAAG,CAAA,CAEJ,CAAC","x_google_ignoreList":[0]}
--------------------------------------------------------------------------------
/src/web/assets/dist/assets/welcome-2KWkXHu8.js.map.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nystudio107/craft-imageoptimize/77cfa09fc779ee77be376603f66f92e1283df0eb/src/web/assets/dist/assets/welcome-2KWkXHu8.js.map.gz
--------------------------------------------------------------------------------
/src/web/assets/dist/img/ImageOptimize-icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
30 |
--------------------------------------------------------------------------------
/src/web/assets/dist/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "src/js/ImageOptimize.js": {
3 | "file": "assets/imageoptimize-Cb5BVZk9.js",
4 | "name": "imageoptimize",
5 | "src": "src/js/ImageOptimize.js",
6 | "isEntry": true,
7 | "css": [
8 | "assets/imageoptimize-B4gebLDH.css"
9 | ]
10 | },
11 | "src/js/OptimizedImagesField.js": {
12 | "file": "assets/field-D_XkB3eu.js",
13 | "name": "field",
14 | "src": "src/js/OptimizedImagesField.js",
15 | "isEntry": true
16 | },
17 | "src/js/Welcome.js": {
18 | "file": "assets/welcome-2KWkXHu8.js",
19 | "name": "welcome",
20 | "src": "src/js/Welcome.js",
21 | "isEntry": true
22 | }
23 | }
--------------------------------------------------------------------------------