Plugin Directory

Changeset 2690566


Ignore:
Timestamp:
03/08/2022 07:30:26 AM (4 years ago)
Author:
interfacelab
Message:
  • Added new option to imgix to disable urlencode() the filename which may cause issues for certain unicode characters in filenames. If imgix is working fine for you, you should not turn this on.
  • Fixed missing regions in the setup wizard for Wasabi
Location:
ilab-media-tools/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • ilab-media-tools/trunk/classes/Tools/Imgix/ImgixTool.php

    r2687503 r2690566  
    347347        }
    348348
     349        $doNotUrlEncode = apply_filters('media-cloud/dynamic-images/do-not-url-encode', $this->settings->doNotUrlEncode);
    349350        $result = [
    350             $imgix->createURL(str_replace(['%2F', '%2540', '%40'], ['/', '@', '@'], urlencode($imageFile)), $params),
     351            $imgix->createURL(str_replace(['%2F', '%2540', '%40'], ['/', '@', '@'], $doNotUrlEncode ? $imageFile : urlencode($imageFile)), $params),
    351352            $size[0],
    352353            $size[1]
     
    500501
    501502
     503            $doNotUrlEncode = apply_filters('media-cloud/dynamic-images/do-not-url-encode', $this->settings->doNotUrlEncode);
    502504            $result = [
    503                 $imgix->createURL(str_replace(['%2F', '%2540', '%40'], ['/', '@', '@'], urlencode($imageFile)), ($skipParams) ? [] : $params),
     505                $imgix->createURL(str_replace(['%2F', '%2540', '%40'], ['/', '@', '@'], $doNotUrlEncode ? $imageFile : urlencode($imageFile)), ($skipParams) ? [] : $params),
    504506                $meta['width'],
    505507                $meta['height'],
     
    754756        }
    755757
    756         return $imgix->createURL(str_replace(['%2F', '%2540', '%40'], ['/', '@', '@'], urlencode($key)), $params);
     758        $doNotUrlEncode = apply_filters('media-cloud/dynamic-images/do-not-url-encode', $this->settings->doNotUrlEncode);
     759        return $imgix->createURL(str_replace(['%2F', '%2540', '%40'], ['/', '@', '@'], $doNotUrlEncode ? $key : urlencode($key)), $params);
    757760    }
    758761
  • ilab-media-tools/trunk/classes/Tools/Imgix/ImgixToolSettings.php

    r2526861 r2690566  
    3636 * @property ?string cropMode
    3737 * @property ?string cropPosition
     38 * @property bool doNotUrlEncode
    3839 */
    3940class ImgixToolSettings extends DynamicImagesToolSettings {
     
    5758        'cropMode' => ['mcloud-imgix-crop-mode', null, null],
    5859        'cropPosition' => ['mcloud-imgix-crop-position', null, 'center'],
     60        'doNotUrlEncode' => ['mcloud-imgix-do-not-urlencode', null, false],
    5961    ];
    6062
     
    131133
    132134    public function __isset($name) {
    133         if (in_array($name, ['imgixDomains', 'noGifSizes', 'keepThumbnails'])) {
     135        if (in_array($name, ['imgixDomains', 'noGifSizes', 'keepThumbnails', 'doNotUrlEncode'])) {
    134136            return true;
    135137        }
  • ilab-media-tools/trunk/classes/Tools/Storage/Driver/S3/WasabiStorage.php

    r2687503 r2690566  
    196196                        'us-east-2' => 'US East 2',
    197197                        'us-west-1' => 'US West',
    198                         'eu-central-1' => 'EU'
     198                        'us-central' => 'US Central',
     199                        'eu-central-1' => 'EU (Amsterdam)',
     200                        'eu-west-1' => 'EU (London)',
     201                        'eu-west-2' => 'EU (Paris)',
     202                        'ap-northeast-1' => 'Asia Pacific (Tokyo)',
     203                        'ap-northeast-2' => 'Asia Pacific (Osaka)',
    199204                    ])
    200205                ->endStep()
  • ilab-media-tools/trunk/config/imgix.config.php

    r2526861 r2690566  
    153153                        "title" => "Remove Extra Query Variables",
    154154                        "description" => "Removes extra query variables from the imgix URL such as the <code>ixlib</code> and <code>wpsize</code> variables.",
     155                        "type" => "checkbox",
     156                        "default" => false
     157                    ],
     158                    "mcloud-imgix-do-not-urlencode" => [
     159                        "title" => "Do Not URL Encode File Names",
     160                        "description" => "Disables URL encoding file names, which may improve compatibility for certain unicode characters.",
    155161                        "type" => "checkbox",
    156162                        "default" => false
  • ilab-media-tools/trunk/ilab-media-tools.php

    r2687503 r2690566  
    66Description: Automatically upload media to Amazon S3 and integrate with Imgix, a real-time image processing CDN.  Boosts site performance and simplifies workflows.
    77Author: interfacelab
    8 Version: 4.3.8
     8Version: 4.3.11
    99Requires PHP: 7.4
    1010Author URI: http://interfacelab.io
     
    9696
    9797// Version Defines
    98 define( 'MEDIA_CLOUD_VERSION', '4.3.8' );
     98define( 'MEDIA_CLOUD_VERSION', '4.3.11' );
    9999define( 'MEDIA_CLOUD_INFO_VERSION', '4.0.2' );
    100100define( 'MCLOUD_IS_BETA', false );
  • ilab-media-tools/trunk/lib/mcloud-wp-media/imagify-php/class-imagify.php

    r2370695 r2690566  
    9696            'image' => curl_file_create( $image ),
    9797            'data'  => json_encode(
    98                 array(
     98                (object)array(
    9999                    'aggressive' => ( 'aggressive' === $options['level'] ) ? true : false,
    100100                    'ultra'      => ( 'ultra' === $options['level'] ) ? true : false,
    101                     'resize'     => $options['resize'],
     101                    'resize'     => (object)$options['resize'],
    102102                    'keep_exif'  => $options['keep_exif'],
    103103                )
  • ilab-media-tools/trunk/readme.txt

    r2687503 r2690566  
    66License: GPLv3 or later
    77License URI: http://www.gnu.org/licenses/gpl-3.0.html
    8 Stable tag: 4.3.8
     8Stable tag: 4.3.11
    99Requires PHP: 7.4
    1010
     
    105105
    106106== Changelog ==
     107
     108= 4.3.11 - 3/8/2022 =
     109
     110* Added new option to imgix to disable `urlencode()` the filename which may cause issues for certain unicode characters in filenames.  If imgix is working fine for you, you should not turn this on.
     111* Fixed missing regions in the setup wizard for Wasabi
     112
     113= 4.3.9 - 3/4/2022 =
     114
     115* Fixed Imagify API integration.
    107116
    108117= 4.3.8 - 3/2/2022 =
Note: See TracChangeset for help on using the changeset viewer.