Coder Social home page Coder Social logo

image-resizer's Introduction

Image Resizer icon

Image Resizer for Craft CMS

Image Resizer is a Craft plugin that resizes your assets when they are uploaded. This allows huge images to be resized so as not to use up unnecessary disk space, but still kept at a reasonable resolution. This plugin is not a replacement for using image transforms throughout your site.

Features

  • Automatically resize your asset on-upload, or on-demand.
  • Batch processing and element index action support.
  • Non-destructive option to keep your original assets safe.
  • Checks for resulting larger images first.
  • Handy logging - check to see how Image Resizer has helped your assets.
  • Unlimited use, free forever.

Documentation

Visit the Image Resizer Plugin page for all documentation, guides, pricing and developer resources.

Support

Get in touch with us via the Image Resizer Support page or by creating a Github issue

Sponsor

Image Resizer is licensed under the MIT license, meaning it will always be free and open source – we love free stuff! If you'd like to show your support to the plugin regardless, Sponsor development.

image-resizer's People

Contributors

engram-design avatar svenjungnickel avatar thaoms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

image-resizer's Issues

Upload failed

I'm having an issue using this add-on when uploading SVG files via assets.

With the ImageResizer add-on disabled / uninstalled the SVG's upload perfectly fine. With it enabled / installed I get this error:

Upload failed for icon-arrow-right.svg. The error message was: ”Error uploading the file: The file “/.../uploads/icons/icon-arrow-right.svg” does not appear to be an image.“

But, it seems like the image is uploading because after disabling / uninstalling ImageResizer the images were in fact in the assets to be chosen?!

All folders have the correct permissions and are able to accept that file type. Running Craft Pro 2.4.2693

Image getting stuck in storage>runtime>temp

Description

I have Resize on upload enabled and set to 2000w and 2000h - I can see the images uploaded and these appear as resized versions inside the craft storage>runtime>temp - but they don't get moved over to the assets folder and the bank-end results in the progress bar staying on the screen and nothing happening. I don't see any messages in the logs and I don't see any stuck tasks in the DB.

Working locally on MAMP Pro and I have tried both imagick and gd (although I suspect not an issue as the image is resized).

Steps to reproduce

  1. Upload the asset via the asset editor or the template
  2. Image resized but stays inside : storage>runtime>temp

Additional info

  • Plugin version: 1.0.1
  • Craft version: 2.6.2997

Error opening log

Description

When clicking on 'Log' I get the following error:

count(): Parameter must be an array or an object that implements Countable

Stack trace:
yii\base\ErrorException: count(): Parameter must be an array or an object that implements Countable in /home/vagrant/sites/craft/vendor/verbb/image-resizer/src/services/Logs.php:100
Stack trace:
#0 /home/vagrant/sites/craft/vendor/craftcms/cms/src/web/ErrorHandler.php(84): yii\base\ErrorHandler->handleError(2, 'count(): Parame...', '/home/vagrant/s...', 100)
#1 /home/vagrant/sites/craft/vendor/verbb/image-resizer/src/services/Logs.php(100): craft\web\ErrorHandler->handleError(2, 'count(): Parame...', '/home/vagrant/s...', 100, Array)
#2 /home/vagrant/sites/craft/vendor/verbb/image-resizer/src/controllers/LogsController.php(16): verbb\imageresizer\services\Logs->getLogEntries()
#3 [internal function]: verbb\imageresizer\controllers\LogsController->actionLogs()
#4 /home/vagrant/sites/craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#5 /home/vagrant/sites/craft/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#6 /home/vagrant/sites/craft/vendor/craftcms/cms/src/web/Controller.php(74): yii\base\Controller->runAction('logs', Array)
#7 /home/vagrant/sites/craft/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('logs', Array)
#8 /home/vagrant/sites/craft/vendor/craftcms/cms/src/web/Application.php(237): yii\base\Module->runAction('image-resizer/l...', Array)
#9 /home/vagrant/sites/craft/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('image-resizer/l...', Array)
#10 /home/vagrant/sites/craft/vendor/craftcms/cms/src/web/Application.php(226): yii\web\Application->handleRequest(Object(craft\web\Request))
#11 /home/vagrant/sites/craft/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#12 /home/vagrant/sites/craft/public/index.php(17): yii\base\Application->run()
#13 {main}

Steps to reproduce

  1. Go to Settings for plugin
  2. Click 'Log'

Additional info

  • Plugin version: latest
  • Craft version: 3 RC15

Resizing existing S3 images errors ("No file exists at the given path", "Image already under maximum width/height")

Hi

I'm just using this for the first time – looks like it's going to help some existing sites a lot! I'm getting a lot of errors though when I try to use it.

I'm trying to resize existing images on Amazon S3, and most of them either fail ("No file exists at the given path") or are skipped ("Image already under maximum width/height."). If I "View asset source" from the Assets panel, I see the images correctly on S3, and I can see that they are larger than the width/height limits set in ImageResizer. I've tried batch processing or doing them individually and get the same results.

It seems to work fine with new uploads, but I've got hundreds of existing images so really need to be able to batch process those.

Any thoughts as to what's going wrong?

Thanks in advance!

Edit: also noticed that the "crop image" function in the Assets panel doesn't seem to work when the image is on S3.

Bulk Resize stops if a non-image exists in the directory

First of all: thanks for creating this addon, it looks like it will elegantly solve a problem we have where our clients upload 10MB+ images that slow the site down when combined with image transforms :) .

We had an issue while running a Bulk Resize on a directory that contained a PDF or CSV file. In the Image Resize log we could see the "skipped-non-image" entry however the task would fail every time that file was processed. After stepping through the PHP I realised Craft was throwing an exception stemming from this line in the ImageResizerTask and the exception was just being buried in the craft.log files:

list ($assetWidth, $assetHeight) = ImageHelper::getImageSize($path);

Even though the file cannot be processed as an image the function still tries to get the image dimensions.

To quickly get around this issue with the least amount of code change I came up with the following and created a PR:
#27

If the craft()->imageResizer_resize->resize() function returned false for any reason the task will early exit to prevent any further processing of a non-image and allow the Bulk Resize to continue.

Images failing to upload from an asset source with a matrix field.

Description

When uploading an image to an asset source with a dynamic folder based on the {owner.slug} , I'm getting the following error.

"Upload failed. The error message was: “Argument 1 passed to verbb\imageresizer\services\Service::getSettingForAssetSource() must be of the type integer, null given, called in ###PATH###/vendor/verbb/image-resizer/src/ImageResizer.php on line 95”"

It seems to be failing to create the dynamic volume folder prior to attempting the resize.
If that dynamic folder already exists, it does not throw the error.

Steps to reproduce

  1. Create a matrix with an asset field.
  2. Select "Restrict uploads to a single folder?" and restrict to a volume with {owner.slug} specified.
  3. Try using the matrix field to upload a new image (The volume folder matching the {owner.slug} should not exist first)
  4. You should get a browser alert with the above error.

Additional info

  • Plugin version: 2.0.2
  • Craft version: 3.0.4

Local volume Upload doesn't start resize

This validates an asset on EVENT_BEFORE_HANDLE_FILE while kind is set later. Thus $asset->validate() returns an err: Kind cannot be blank.

if (!$asset->validate()) {

I try to upload an asset via /admin/assets not from an Entry.

PHP version	7.3.4
OS version	Linux 4.4.0-134-generic
Database driver & version	PostgreSQL 10.7
Image driver & version	Imagick 3.4.3 (ImageMagick 6.9.7-4)
Craft edition & version	Craft Solo 3.1.29
Yii version	2.0.19
Twig version	2.11.2
Guzzle version	6.3.3
Imagine version	0.7-dev
Plugins
Asset Rev	6.0.2
Control Panel CSS	2.1.0
Dark Mode	1.1.0
Delete Entry Versions	2.0.0
Image Resizer	2.0.5
Maps	3.4.11
SEOMate	1.0.2
Super Table	2.1.20

Cannot save image asset via php

Steps to reproduce

  1. Save an image via PHP into an asset object.

Additional info

  • Plugin version: 1af64ac
  • Craft version: Craft Pro 3.0.0-RC17.1

When I try to save an image into an asset object via a php plugin I get the following error:

Exception 'TypeError' with message 'Argument 1 passed to verbb\imageresizer\services\Service::getSettingForAssetSource() must be of the type integer, null given, called in /path/to/craft/vendor/verbb/image-resizer/src/ImageResizer.php on line 95'

in /path/to/craft/vendor/verbb/image-resizer/src/services/Service.php:23

Stack trace:
#0 /path/to/craft/vendor/verbb/image-resizer/src/ImageResizer.php(95): verbb\imageresizer\services\Service->getSettingForAssetSource(NULL, 'enabled')
#1 [internal function]: verbb\imageresizer\ImageResizer->beforeHandleAssetFile(Object(craft\events\AssetEvent))
#2 /path/to/craft/vendor/yiisoft/yii2/base/Event.php(310): call_user_func(Array, Object(craft\events\AssetEvent))
#3 /path/to/craft/vendor/yiisoft/yii2/base/Component.php(636): yii\base\Event::trigger('craft\\elements\\...', 'beforeHandleFil...', Object(craft\events\AssetEvent))
#4 /path/to/craft/vendor/craftcms/cms/src/elements/Asset.php(1185): yii\base\Component->trigger('beforeHandleFil...', Object(craft\events\AssetEvent))
#5 /path/to/craft/vendor/craftcms/cms/src/services/Elements.php(351): craft\elements\Asset->beforeSave(true)
#6 /path/to/PLUGIN/src/console/controllers/DefaultController.php(322): craft\services\Elements->saveElement(Object(craft\elements\Asset))
#7 /path/to/PLUGIN/src/console/controllers/DefaultController.php(165): atfredmansky\productsimporter\console\controllers\DefaultController->saveAsset('http://media.si...', Object(craft\elements\Asset), 't617-sigmund & ...')
#8 /path/to/PLUGIN/src/console/controllers/DefaultController.php(62): atfredmansky\productsimporter\console\controllers\DefaultController->fetchFeed()
#9 [internal function]: atfredmansky\productsimporter\console\controllers\DefaultController->actionIndex()
#10 /path/to/craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#11 /path/to/craft/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#12 /path/to/craft/vendor/yiisoft/yii2/console/Controller.php(148): yii\base\Controller->runAction('index', Array)
#13 /path/to/craft/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction('index', Array)
#14 /path/to/craft/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('products-import...', Array)
#15 /path/to/craft/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('products-import...', Array)
#16 /path/to/craft/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(craft\console\Request))
#17 /path/to/craft/craft(23): yii\base\Application->run()
#18 {main}

"A file with the name image_name.jpg already exists" warning for all images

Description

When uploading an image large enough to trigger Image Resizer, Craft warns A file with the name “image_name.jpg” already exists. even when it's a new image with a unique filename. We're using Amazon S3, and I wonder whether Craft first uploads the full-size image, then Image Resizer uploads it's version and thinks there's a conflict? I've tried updating asset indexes but this doesn't fix the issue.

Steps to reproduce

  1. Upload an image to an Amazon S3 volume that has Image Resizer activated

Additional info

  • Plugin version: 2.0.3
  • Craft version: 3.0.25

Error. Not enough memory available to perform this image operation.

Description

Trying to resize a large image to 2000px wide. But keep hitting this error.
Error. Not enough memory available to perform this image operation.

Steps to reproduce

  1. Click the image and then choose resize
  2. Or use the resize batch in the image resize panel

Additional info

I have ramped up my PHP memory limit to a whopping 5500M.

  • Plugin version: 1.1.0
  • Craft version: 2.6.3000

'originals' folders don't get created on upload

I noticed that the originals folder is not created at the time an image is uploaded, even though I have the Non-destructive setting enabled. I only see it being creating when bulk-resizing images... but that's of course too late since the original file is gone at that point.

Craft 2.5 compatible

Is this compatible with Craft 2.5? I just chucked it in a project and the cropping modal is a bit borked, equally it couldn’t save the crop when I did get one done.

What is required to make it work?

Most of my resizing turns into a stuck task.

I have installed and configured ImageResizer. All files have the right access rights. I have imageMagick installed. I am using S3 for storage.

What else is needed?

"Unknown error occured"

Hi there,

I happily installed this plugin today, but whenever it starts to perform a resize action ("bulk resize" or when it should start processing a freshly uploaded picture), it gives the "Unknown error occured" error. 💔

I know this is not very helpful, but the error message isn't either ;) Please let me know where I can find useful information.
I am on Craft CMS 2.6.2954 , PHP version 5.6.28 , ...

Ahh, I now found an error message "PHP exif extension is required to use the ExifMetadataReader". Could this be the culprit? :)

Resize on upload cant be turned off

Description

If I disable Resize on upload the setting doesn't get saved:
image

Steps to reproduce

  1. Go to the settings page
  2. Turn of Resize on upload on a specific asset resource
  3. press Save

Additional info

  • Plugin version: 1.0.1
  • Craft version: 2.6.3002

Error when opening an image modal and clicking save

Description

When double clicking on an image asset (within an entry edit page) and then clicking on “save” within the image asset modal an error occurs and any changes to the image fields are not saved.

Here is the error displayed in the log:

[error][TypeError] TypeError: Argument 3 passed to verbb\imageresizer\services\Resize::resize() must be of the type string, null given, called in /apps/crafty/vendor/verbb/image-resizer/src/ImageResizer.php on line 98 and defined in /apps/crafty/vendor/verbb/image-resizer/src/services/Resize.php:31

Steps to reproduce

  1. Add an image asset field (with default image resize settings applied) to an entry section
  2. Create a new entry in the section
  3. Click on the image asset field and select or upload a new image
  4. Double click on the “green circle icon” next to the image to bring up the image modal
  5. Click save in the modal window

Additional info

  • Plugin version: 2.0.1
  • Craft version: rc11

Feature request: Make all strings translatable

Hello,

I tried this, for example:

Craft.t('You are about to resize {actionDescription} to be a maximum of {settings_width}px wide and {settings_height}px high. Alternatively, set the width and height limits below for on-demand resizing.', { actionDescription: actionDescription, settings_width: settings.width, settings_height: settings.height}) on ResizeElementAction.js

And other simple strings ... but I don't know why does not translate. Could it be by calling JS on ElementAction? Loading js files is done on demand (after click on Resize image).

Multiple resize actions

Great addon, but it would be nice if we could define multiple dimensions so we can create more sizes (small, medium, large).

Thanks!

"Resize for remote sources not supported"

Description

When uploading assets (and resizing existing assets), I get the error:

Resize for remote sources not supported.

This is concerning assets in an AmazonS3 bucket. Note that the bucket is fully configured and works with the site. Normal Craft transforms etc work perfectly.

Steps to reproduce

  1. Install and enable plugin
  2. Either:
    a) Upload a new asset (AmazonS3)
    b) Resize an existing asset (AmazonS3)

Additional info

  • Plugin version: 1.1.0
  • Craft version: 2.6.3011

Screenshot with the error logs:

screenshot-01

Screenshot with plugin settings:

screenshot-02

Thanks for taking the time to build this plugin. It is exactly what we were looking for, and I hope we can resolve this issue.

"Skipped non image" when uploading image from front-end form

Description

When uploading an image via a front-end form, Image Resizer skips over images with the reason "skipped non image". I had a look into the where the logging comes from, and it looks like it's failing on this line:

if (!ImageHelper::canManipulateAsImage(@pathinfo($path, PATHINFO_EXTENSION))) {

From a front end upload, the value of @pathinfo($path, PATHINFO_EXTENSION) is an empty string, and the value of $path is '/tmp/phpBdbLIe'. Comparatively, uploading the same image through the CMS gives the value of @pathinfo($path, PATHINFO_EXTENSION) is EXT01_HK.jpg and the value of $path is /sites/site-name/storage/runtime/temp/EXT01_HK5cb839db1cd847.86416297.jpg

The image is still successfully uploaded in either instance, but Image Resizer will skip over processing the image from the front-end (but not when uploading via Craft).

Steps to reproduce

  1. Create a form on the front-end of a Craft build with an file type input
  2. Upload an image through form

Additional info

  • Plugin version: 2.0.4
  • Craft version: 3.1.23

"Image already under the maximum width/height" when it's not

Description

When I try to resize a large image (4096x2733, 1.4MB) by Bulk Resize to a max image width/height of 2048, my logs show that the image resize was skipped because "Image already under the maximum width/height." I tried setting the width to 2048 and height to 0 as well, but it still skips.

Any idea why it's skipping?

Steps to reproduce

  1. In Imager Resizer Settings > Bulk Resize, select Bulk Resize for an Asset folder that includes large image (4096x2733).
  2. In modal with resize options, set width and height to 2048 (or height to 0).

Additional info

  • Plugin version: 2.0.4
  • Craft version: 3.0.34

Issue with alpha-transparency PNGs (especially TinyPNG-optimized ones)

EDIT: Actually, I disabled Image Resizer entirely and the problem still occurs, so I don't think Image Resizer is to blame here. Unfortunately, there's no other plugin that seems like it would be involved in image uploads, so I'm stumped.

Description

I have a 24-bit PNG with an "alpha-channel" (grayscale, not B&W) transparency. I've run the image through the wonderful service at TinyPNG.com, which shrinks it from 568Kb down to a mere 126Kb, while maintaining the grayscale transparency. Note that the image dimensions on both images are unchanged, and are below the width & height limits as defined in Image Resizer.

If I upload the original image to a Craft site with Image Resizer running, the result is a slightly-larger PNG at 587Kb (vs 568Kb as uploaded; a 3.5% increase), but with the transparency intact, as seen in part here:

image

However, if I upload the TinyPNG-compressed image, the result is a much larger PNG at 274Kb (vs 126Kb as uploaded; a 218% increase!) and the transparency is converted into an ugly B&W transparency:

image

In both cases, the "Skip larger resulting images" setting is enabled, and according to the log, the images were skipped. However, they were definitely processed to some extent, as the images ended up with changed file sizes and—in the case of the TinyPNG-optimized image—ruined transparency).

Steps to reproduce

  1. Create a PNG with alpha-channel transparency.
  2. Run the image through TinyPNG and save the result as a copy.
  3. Upload both images to a Craft site with Image Resizer enabled and examine the resulting files.

Additional info

  • Plugin version: 2.0.3
  • Craft version: 3.0.23.1

Non-destructive option not working

Image Resizer will save a copy of your original image, untouched. This will be in a folder called originals, relative to the source image.

Description

I have enabled the 'Non-destructive' lightswitch in the plugin settings, but the above statement is not happening. Images are uploaded, re-named and re-sized correctly, but no originals folder is created. I can't see any trace of the original image.

Additional info

  • Plugin version: 2.0.3
  • Craft version: 3.0.26.1

Permissions problem?

I'm on versions 0.1.3 and 2.6.2793 and if logged in as any user other than Admin if I try and crop an asset I get a message "An unknown error Occured" and no image in the popup. If I log in as Admin it all works fine.
Console log screenshot attached.
console_log
I'm thinking this may be a permissions thing, but can't find anywhere that you can set those for users.

Asset Error: _resizeImage() must be of the type integer or null, string given.

Description

When loading an asset via FeedMe from a URL, I get this error in the FeedMe logs:

Asset error: https://waveguide-screenshots-optimized.s3.us-west-2.amazonaws.com/mobile/Bobby2-iPhoneX/Bobby2-iPhoneX_nca2b.JPG - Argument 3 passed to verbb\imageresizer\services\Resize::_resizeImage() must be of the type integer or null, string given, called in /srv/app/artifact/htdocs/vendor/verbb/image-resizer/src/services/Resize.php on line 98

Found this issue while troubleshooting another issue I have with Feed Me.
This (for reference) -> craftcms/feed-me#305

Additional info

  • Plugin version: 2.0.2
  • Craft version: 3.0.4

Uploading SVG with resize generates an error

Description

When uploading an SVG file it will generate an error because the Craft/SvgImage has changed.

Error occured:

Call to undefined method Craft\SvgImage::setQuality() (/craft/plugins/imageresizer/services/ImageResizer_ResizeService.php:66)

Steps to reproduce

  1. Upload SVG file which needs to be resized on upload

Additional info

  • Plugin version: 1.0.0
  • Craft version: 2.6.2997

Log Clearing now working

When I go to clear the log with the new version I get this error.

"Craft\ImageResizer_LogsController._currentLogFileName" is not defined.

Feature-Reuest: Save Copy of Asset / Non destructive resizing

I'd appreciate if there was an option to make the resize non destructive. If non-destructive is selected, I could imagine that the original image and it's path could be saved in a originals folder and referenced every time when the transform of a certain image is selected.

Last but not least: thank you for the great work on this. I like this plugin because of its simplicity!

Image Resizer causes scripts to fail loading

Description

After installing image-resizer I can't change uploaded filenames and their alt attribute in the "assets" section any longer. The save-script fails with:

jquery.js:9566 POST https://craft-3-transform-bug.test/index.php?p=admin/actions/elements/save-element 500 (Internal Server Error)
``` 

When I deactivate `image-resizer` it works again.

### Steps to reproduce

1. install `image-resizer`
2. change a file-name in "assets"
3. try to save changes and it should fail (hopefully :))

### Additional info

- Plugin version: 2.0.1
- Craft version: 3.0.0-RC10.1

Images won't upload (on some particular client devices)

Description

This is a very weird bug and I can't wrap my head around it. I installed the plugin on a live website and everything works as expected. I can resize/compress images that were previously uploaded and new images get resized automatically. It works, ON MY DEVICE. My client who is also the content manager, for some reason can't.

Whenever he uploads an image, it shows the loading bar animation, and after that an infinitely spinning wheel. The images do get stored in the storage>runtime>temp, but not in the assets folder.
This is also the case in the bug described in issue #33. As it's suggested there to be solved by moving the site to a different server, I'm not sure if that issue is related to mine.

Obviously, the client and I are working on the same (live) website, so I'm assuming it's nothing to do with my server settings, since everything works as expected here.
We both have the same internet provider. I tested the plugin on my mac on his home network, and it still works for me.
I'm on Mac OSX, my client is on a Windows. All my browsers here do the trick, all his browsers don't (tested in Internet Explorer, Edge and Google Chrome).

Disabling the image-resizer plugin gives no issues when uploading images.

Steps to reproduce

  1. Upload one or more images via the File Manager or content>entry in the craft backend.
  2. Endless spinning wheel.
  3. Image stays inside : storage>runtime>temp.

Additional info

  • Plugin version: 1.1.0
  • Craft version: 2.6.3005

Depreciation Warning Craft 3

Description

craft\helpers\FileHelper::removeFile() is deprecated. Use craft\helpers\FileHelper::unlink() instead.

vendor/verbb/image-resizer/src/services/Logs.php

Steps to reproduce

  1. Run the clear logs function in the plugin
  2. View Craft's Depreciation Warnings

Additional info

  • Plugin version: 2.0.4
  • Craft version: 3.1.28

If resized image is larger filesize than original image, resize should skip.

Love this plugin, awesome work! You've really helped me reduce bandwidth and traffic coming from Craft image assets. I've seen real world savings of 500+ MB where clients were uploading 5 MB images that when resized down to the the correct resolution limits were only 90 KB.

Just one thing FYI though:

I've a few PNG+a images that are 1000x1000px @ ~110-140 KB each. Resizing them to 960x960px @ 80% quality, yields images ~350-370 KB each. Here are few for you to test:

If the resized image is actually larger in file size than the original image, perhaps there should be a setting to skip the de-optimizations if they occur.

Thanks :)

Don't know if GH will recompress these in this post or not.

a
b
c

Images hosted in Rackspace Cloud Files

I'm trying your plugin on Craft 2.5, I've installed it and the plugin appears to work, when I upload a file I can click the tick, choose "crop" and then apply a crop however whenever I try to "save" the cropped file I get the error in red at the top centre that the crop failed. I presume this is because the files are held on Rackspace Cloud Files and there's some issue with editing them in this location?

Would be great to know if this is a known issue and if there's a likely resolution in the pipeline.

Thanks for your help.

Non-destructive Cropping

Is there an option to revert to the original image after cropping? Often times I need to try various croppings and I think the only way to do this currently is by reuploading the original image.

Thanks!

1.0.0 error in css and js links in template

The includes in templates/settings/index.html are missing the /resources/ part of the address.
But having corrected those the tab bar's not quite right, with an additional Settings tab that I don't think should be there.

Feature request

I'm sorry if this request shouldn't be here. If that is the case, please remove it, I won't mind.

I have this request that came out of a need on a site I'm working on for a photographer.
It's basically about cropping images.

Would it be possible to extend this plugin, or perhaps create a new one based on this that allows a user to; - Create a FIELD that contains an image you select from assets, AND the crop control of this plugin. Then the system would create a copy of the original asset, only with the cropping you selected. Instead of saving it over the original asset? This could be used to create specific cropping on images for phones, tables and desktops. Without cruttering the actual assets folder.

I'm aware there are some plugins that allows this, also Craft has ways of doing this, based on a dropdown where you can select 'top, center, bottom' etc. But that would hardly suffice for the photographer who needs exact control of the cropping.

Cropping crops incorrectly

Cropping an image produces a slightly unexpected result...

Crop:
Cropping

Result:
fill_murray_1000x1000

ImageResizer v0.1.4
Craft v2.6.2958

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.