Giter Site home page Giter Site logo

runelaenen / sw6-media-optimizer Goto Github PK

View Code? Open in Web Editor NEW
28.0 5.0 6.0 120 KB

Image Optimizer for Shopware 6 ๐Ÿ’™

License: MIT License

PHP 100.00%
shopware shopware6 shopware-plugin shopware-plugins shopware-platform-plugin shopware6-plugin

sw6-media-optimizer's People

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

Watchers

 avatar  avatar  avatar  avatar  avatar

sw6-media-optimizer's Issues

Feature Request,

Hello @runelaenen
Thanks for the great plugin. It makes live a much easier.

I`m asking if it is possible to add a new switch on the command to set the max width of a image.

So for example if the switch --max-midth is set then all images are first resized and then processed through the optimizer.
https://github.com/Intervention/image
This library could be used to resize the image.
I will try to implement the feature and then set up a pull request.

Install via Zip does not work

Hi there,
I have SW 6.3.3.0 and installed your plugin via Zip upload (admin interface). When trying to use the command:

bin/console rl:media:optimize

it fails with the following exception:

In srcShopware_Production_KernelProdContainer.php line 16965:
                                                                                           
  Attempted to load class "OptimizerChainFactory" from namespace "Spatie\ImageOptimizer".  
  Did you forget a "use" statement for another namespace?         

Any idea to fix this?

support filesystem

The optimizing should respect the used filesystem.
Currently, it assumes using local storage.

Exception on empty filename (should be skipped)

Hey,
I'm currently facing a small issue - should be easy to fix (MediaOptimizeCommand.php#L158)

$ bin/console rl:media:optimize
  33/909 [=>--------------------------]   3%20:17:27 CRITICAL  [console] Error thrown while running command "rl:media:optimize". Message: "A valid Filename must be provided." ["exception" => Shopware\Core\Content\Media\Exception\EmptyMediaFilenameException^ { โ€ฆ},"command" => "rl:media:optimize","message" => "A valid Filename must be provided."]

In UrlGenerator.php line 136:
                                      
A valid Filename must be provided. 

If you need any further information, just let me know. (Btw. nice plugin!)

Cheers.

[edit]
Added linenumber and filename where the error is initially triggered.

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.