Git Product home page Git Product logo

module-web-images's People

Contributors

darkdevelopers avatar magestyapps 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

module-web-images's Issues

UI component image uploader does't work when allowedExtensions property is `false`

Modules has mixin for UI component Magento_Ui/js/form/element/image-uploader. This mixin always extends allowedExtensions property with strings svg and webp.
Originally in Magento when allowedExtensions has boolean value false then file with any extension can be uploaded.
Property allowedExtenmsion has value false svg webp after running the mixin mentioned above. And almost any image file except svg and webp not possible to upload.

I offer next modification:

--- /tmp/fz3temp-2/image-uploader-mixin.js
+++ /tmp/fz3temp-2/image-uploader-mixin.js (Unsaved)
@@ -11,8 +11,10 @@
             initialize: function () {
                 this._super();
 
-                this.allowedExtensions += ' svg';
-                this.allowedExtensions += ' webp';
+                if (typeof this.allowedExtensions === 'string') {
+                    this.allowedExtensions += ' svg';
+                    this.allowedExtensions += ' webp';
+                }
             }
         });
     };

Existing SVG/WEBP images do not sync with commands

I already had a folder with a lot of .svg's in it, and the following commands did not pull them in to the media gallery, like they did for the default file types:

bin/magento media-content:sync
bin/magento media-gallery:sync

I was able to fix this by adding the following to the di.xml in MagestyApps/WebImages/etc/di.xml

    <type name="Magento\MediaGallerySynchronization\Model\FetchMediaStorageFileBatches">
        <arguments>
            <argument name="fileExtensions" xsi:type="array">
                <item name="svg" xsi:type="string">svg</item>
                <item name="webp" xsi:type="string">webp</item>
            </argument>
        </arguments>
    </type>

module compilation problem after updating via composer

Magento 2.4.1

I am getting the following error

Compilation was started.
Area configuration aggregation... 5/9 [===============>------------] 55% 1 min 406.0 MiB
In ClassReader.php line 45:

Impossible to process constructor argument Parameter #14 [ Magento\Catalog\Model\Config\CatalogMediaConfig or NULL $catalogMediaConfig = NULL ] of MagestyApps\WebImages\App\MediaRewrite class

In ClassReader.php line 34:

Class Magento\Catalog\Model\Config\CatalogMediaConfig does not exist

can you guys help

programmatically product import issue.

I run following code for import product with image.

$product = $objectManager->get('Magento\Catalog\Model\Product')->load(4);
$importDir = '/var/www/magento/pub/media/import;
//$url = $importDir . $product->getImage();
$product->addImageToMediaGallery("$importDir/zion-t-zzz-un.webp", array('image', 'small_image', 'thumbnail'), false, false);
$product->save();

I got the following error.
PHP Fatal error: Uncaught Magento\Framework\Exception\LocalizedException: The image type for the file is invalid. Enter the correct image type and try again. in /var/www/magento/vendor/magento/module-catalog/Model/Product/Gallery/Processor.php:164

Compile Issues coming

Source class "\MagestyApps\WebImages\Model\AssetInterface" for "MagestyApps\WebImages\Model\AssetInterfaceFactory" generation does not exist.

module compilation problem after updating via composer

the report ssh:

Interception cache generation... 6/9 [==================>---------] 66% 1 min 326.0 MiBErrors during compilation:
MagestyApps\WebImages\App\MediaRewrite
Incompatible argument type: Required type: string. Actual type: \MagestyApps\WebImages\App\mediaDirectory; File:
/var/www/magento2/vendor/magestyapps/module-web-images/App/MediaRewrite.php

Total Errors Count: 1

In Log.php line 92:

Error during compilation

ObjectManager isn't initialized

ObjectManager isn't initialized
#0 /vendor/magento/framework/File/Mime.php(84): Magento\Framework\App\ObjectManager::getInstance()
#1 /pub/get.php(61): Magento\Framework\File\Mime->__construct()

When uploaded a SVG file and requested at the front-end we are receiving above PHP error. Any idea?

Impossible to upload any image, any format after install

I installed this extension on a brand new magento-2.4.6-p3 and after install no image could be uploaded to product images and to media gallery. It even prevented images from being imported with tools like Firebear import-export. I disabled it and everything worked again.
Needless to say that I did all the things necessary to install it (upgrade etc....being a developer myself).

Extend module for swatches

Hi there!
Is it possible to add feature to allow upload svgs and webPs to attributes swatches?
Everything works fine except this section.

with watermark doesn't show

hi
I Installed extension if you have watermark for base image doesn't show image and show magento thumbnail
i tested it with magento 2.4.5

Warning: call_user_func() expects parameter 1 to be a valid callback

Hi, I'm getting the following error when trying to upload a webp image on my live site:

It seems to upload the image after that error, however, the thumbnail is broken.

image.webp was not uploaded.
Warning: call_user_func() expects parameter 1 to be a valid callback, function 'imagecreatefromwebp' not found or invalid function name in /var/www_m2/site.co.uk/releases/3134dd48-4b49-4c52-9235-d3d75892f2d3/vendor/magestyapps/module-web-images/Model/Image/Adapter/Gd2Rewrite.php on line 80`

magestyapps/module-web-images: 1.1.6
magento/product-community-edition: 2.4.3-p2

Support for Web API

At the moment the extension works with the Magento UI and the import function, but doesn't support Web API.

At the moment the Web API return that this MIME image is not supported.

It would be a great feature for this module.

Include PDFs?

Would it be possible to update this module to include PDFs? They are not images, but would be very useful.

Is there branch for magento 2.3.4

I have installed version 1.1.2(magestyapps/module-web-images) of this module to Magento 2.3.4. Only problem is that after resize pictures are black and white. Is there fully working version for Magento 2.3.4 ? Or somebody has similar problem. Magento2 is using GD to resize I think.

Alpha Channel missing after upload

After uploading a webp product picture with a transparent background, the product picture is transformed to a picture with a white background.

Unsupported watermark image format / Lighter thumbnails

Hello,
Thank you for this great plugin :)

The upload works well, but unfortunately product images are not generated when a (PNG) watermark is used, we have the following error : Unsupported watermark image format.

In order to solve that we added the missing callbacks to the Gd2Rewrite class :

private static $_callbacks = [ IMAGETYPE_GIF => ['output' => 'imagegif', 'create' => 'imagecreatefromgif'], // Fixes watermark IMAGETYPE_JPEG => ['output' => 'imagejpeg', 'create' => 'imagecreatefromjpeg'], // Fixes watermark IMAGETYPE_PNG => ['output' => 'imagepng', 'create' => 'imagecreatefrompng'], // Fixes watermark IMAGETYPE_XBM => ['output' => 'imagexbm', 'create' => 'imagecreatefromxbm'], // Fixes watermark IMAGETYPE_WBMP => ['output' => 'imagewbmp', 'create' => 'imagecreatefromxbm'], // Fixes watermark IMAGETYPE_WEBP => ['output' => 'imagewebp', 'create' => 'imagecreatefromwebp'], ];

It seems to work but now the thumbnail seems much more lighter than the original image, maybe it is a problem due to the watermark ?

Capture d’écran de 2023-12-13 11-10-54

Thank you for your help :)

Mathieu.

Upload of avif images

Hello,
How can I update this plugin so that I can also upload avif images?
Thank you

The attribute with a "attr_manufacturer" attributeCode doesn't exist. Verify the attribute and try again.

Hello. Sharing Amasti extensions gives an error.
ext Amasty_Base, Amasty_ShopbyBrand
1 exception(s):
Exception #0 (Magento\Framework\Exception\NoSuchEntityException): The attribute with a "attr_manufacturer" attributeCode doesn't exist. Verify the attribute and try again.

Exception #0 (Magento\Framework\Exception\NoSuchEntityException): The attribute with a "attr_manufacturer" attributeCode doesn't exist. Verify the attribute and try again.

#1 Magento\Catalog\Model\Product\Attribute\Repository->get() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#2 Magento\Catalog\Model\Product\Attribute\Repository\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#3 Magento\Catalog\Model\Product\Attribute\Repository\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#4 Magento\Catalog\Model\Product\Attribute\Repository\Interceptor->___callPlugins() called at [generated/code/Magento/Catalog/Model/Product/Attribute/Repository/Interceptor.php:23]
#5 Magento\Catalog\Model\Product\Attribute\Repository\Interceptor->get() called at [vendor/amasty/module-shop-by-base/Model/OptionSetting.php:689]
#6 Amasty\ShopbyBase\Model\OptionSetting->getAttributeOptions() called at [vendor/amasty/module-shop-by-base/Model/OptionSetting.php:672]
#7 Amasty\ShopbyBase\Model\OptionSetting->getAttributeOption() called at [vendor/amasty/module-shop-by-brand/ViewModel/OptionProcessor.php:69]
#8 Amasty\ShopbyBrand\ViewModel\OptionProcessor->process() called at [vendor/amasty/module-shop-by-base/Block/Product/AttributeIcon.php:119]
#9 Amasty\ShopbyBase\Block\Product\AttributeIcon->getOptionsData() called at [vendor/amasty/module-shop-by-base/view/frontend/templates/attribute/icon.phtml:11]
#10 include() called at [vendor/magento/framework/View/TemplateEngine/Php.php:71]
#11 Magento\Framework\View\TemplateEngine\Php->render() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#12 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#13 Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/amasty/module-fpc-warmer/Plugin/Holepunch/TemplateRenderer.php:52]
#14 Amasty\Fpc\Plugin\Holepunch\TemplateRenderer->aroundRender() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#15 Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#16 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php:23]
#17 Magento\Framework\View\TemplateEngine\Php\Interceptor->render() called at [vendor/magento/framework/View/Element/Template.php:273]
#18 Magento\Framework\View\Element\Template->fetchView() called at [vendor/magento/framework/View/Element/Template.php:303]
#19 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1111]
#20 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/Cache/LockGuardedCacheLoader.php:136]
#21 Magento\Framework\Cache\LockGuardedCacheLoader->lockedLoadData() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1133]
#22 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:675]
#23 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/amasty/module-shop-by-brand/Plugin/Catalog/Block/Product/View/BlockHtmlTitlePlugin.php:77]
#24 Amasty\ShopbyBrand\Plugin\Catalog\Block\Product\View\BlockHtmlTitlePlugin->generateLogoHtml() called at [vendor/amasty/module-shop-by-brand/Plugin/Catalog/Block/Product/View/BlockHtmlTitlePlugin.php:51]
#25 Amasty\ShopbyBrand\Plugin\Catalog\Block\Product\View\BlockHtmlTitlePlugin->afterToHtml() called at [vendor/magento/framework/Interception/Interceptor.php:146]
#26 Amasty\Mage24Fix\Block\Theme\Html\Title\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#27 Amasty\Mage24Fix\Block\Theme\Html\Title\Interceptor->___callPlugins() called at [generated/code/Amasty/Mage24Fix/Block/Theme/Html/Title/Interceptor.php:329]
#28 Amasty\Mage24Fix\Block\Theme\Html\Title\Interceptor->toHtml() called at [vendor/magento/framework/View/Layout.php:578]
#29 Magento\Framework\View\Layout->_renderBlock() called at [vendor/magento/framework/View/Layout.php:555]
#30 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#31 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#32 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#33 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#34 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#35 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#36 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#37 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#38 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#39 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#40 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#41 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#42 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#43 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#44 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#45 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#46 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#47 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#48 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#49 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#50 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#51 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#52 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#53 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#54 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#55 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#56 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#57 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#58 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#59 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#60 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#61 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#62 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#63 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#64 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#65 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#66 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#67 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#68 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:975]
#69 Magento\Framework\View\Layout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#70 Magento\Framework\View\Layout\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#71 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#72 Magento\Framework\View\Layout\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:347]
#73 Magento\Framework\View\Layout\Interceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:258]
#74 Magento\Framework\View\Result\Page->render() called at [vendor/magento/framework/View/Result/Layout.php:171]
#75 Magento\Framework\View\Result\Layout->renderResult() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#76 Magento\Framework\View\Result\Page\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#77 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#78 Magento\Framework\View\Result\Page\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:95]
#79 Magento\Framework\View\Result\Page\Interceptor->renderResult() called at [vendor/magento/framework/App/Http.php:120]
#80 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:23]
#81 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#82 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:29]

File validation failed - Uploading SVG file

I m getting this error message File validation failed when I tried to upload a svg file to a static block.
I m running Magento 2.4.2 and the module version is 1.0.1
Could you please have a look ? Thanks

Webp images show colourless

I have installed your extension, when I add .webp image in product images it works nice. At the PDP when you swipe and open webp picture it is not showing properly. It is colourless sometimes and some webp images are blur. Please share your thought about that. Is that an extension issue? or magento issue or what?
Waiting for the reply..

Compilation issue : Incompatible argument type: Required type: string. Actual type: File

Dear,

After compiling a M 2.4.3-p1 with 1.1.3, I encounter and issue regarding the argument type : string vs file

Interception cache generation... 6/9 [==================>---------] 66% 42 secs 610.0 MiBErrors during compilation: MagestyApps\WebImages\Model\File\Uploader Incompatible argument type: Required type: string. Actual type: \MagestyApps\WebImages\Model\File\fileId; File: /var/www/vhosts/------/src/vendor/magestyapps/module-web-images/Model/File/Uploader.php

It's compiling fine with 1.1.2

Regards

SVG / WebP Images Not Uploading To Media Gallery

Magento: 2.4.6-p3
PHP: 8.1.2
Apache: 2.4.52
module-web-images: 1.1.9

Neither SVG or WebP images upload to the Media Gallery.

I get the standard error message, e.g. "Magento.svg: File validation failed."

Elsewhere images upload correctly it's just the Media Gallery.

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.