I have been trying to upload image in magento 2 for a product but its giving me error. If I try to upload image for existing product it gives same error.
Notice: A non well formed numeric value encountered in /home/basecooking/orders.basecooking.se/vendor/magento/framework/Image/Adapter/Gd2.php on line 344
When I checked logs, I got these
[2017-05-12 18:29:13] main.CRITICAL: Exception: Notice: A non well formed numeric value encountered in /home/basecooking/orders.basecooking.se/vendor/magento/framework/Image/Adapter/Gd2.php on line 344 in /home/basecooking/orders.basecooking.se/vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(8, 'A non well form...', '/home/basecooki...', 344, Array)
#1 /home/basecooking/orders.basecooking.se/vendor/magento/framework/Image/Adapter/Gd2.php(344): imagecreatetruecolor('100 ', '136')
#2 /home/basecooking/orders.basecooking.se/vendor/magento/framework/Image.php(119): Magento\Framework\Image\Adapter\Gd2->resize('100 ', '136')
#3 /home/basecooking/orders.basecooking.se/vendor/magento/module-catalog/Model/Product/Image.php(578): Magento\Framework\Image->resize('100 ', '136')
#4 /home/basecooking/orders.basecooking.se/vendor/magento/module-catalog/Helper/Image.php(460): Magento\Catalog\Model\Product\Image->resize()
#5 /home/basecooking/orders.basecooking.se/vendor/magento/module-catalog/Helper/Image.php(523): Magento\Catalog\Helper\Image->applyScheduledActions()
#6 /home/basecooking/orders.basecooking.se/vendor/magento/module-catalog/Model/Product/Image/Cache.php(126): Magento\Catalog\Helper\Image->save()
#7 /home/basecooking/orders.basecooking.se/vendor/magento/module-catalog/Model/Product/Image/Cache.php(88): Magento\Catalog\Model\Product\Image\Cache->processImageData(Object(Magento\Catalog\Model\Product\Interceptor), Array, '/b/e/beef_rub_f...')
#8 /home/basecooking/orders.basecooking.se/vendor/magento/module-catalog/Model/Product.php(930): Magento\Catalog\Model\Product\Image\Cache->generate(Object(Magento\Catalog\Model\Product\Interceptor))
#9 /home/basecooking/orders.basecooking.se/var/generation/Magento/Catalog/Model/Product/Interceptor.php(362): Magento\Catalog\Model\Product->afterSave()
#10 /home/basecooking/orders.basecooking.se/vendor/magento/framework/EntityManager/Observer/AfterEntitySave.php(34): Magento\Catalog\Model\Product\Interceptor->afterSave()
#11 /home/basecooking/orders.basecooking.se/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\Framework\EntityManager\Observer\AfterEntitySave->execute(Object(Magento\Framework\Event\Observer))
#12 /home/basecooking/orders.basecooking.se/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\Framework\EntityManager\Observer\AfterEntitySave), Object(Magento\Framework\Event\Observer))
#13 /home/basecooking/orders.basecooking.se/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#14 /home/basecooking/orders.basecooking.se/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('magento_catalog...', Array)
#15 /home/basecooking/orders.basecooking.se/vendor/magento/framework/EntityManager/EventManager.php(51): Magento\Framework\Event\Manager\Proxy->dispatch('magento_catalog...', Array)
#16 /home/basecooking/orders.basecooking.se/vendor/magento/framework/EntityManager/Operation/Update.php(108): Magento\Framework\EntityManager\EventManager->dispatchEntityEvent('Magento\\Catalog...', 'save_after', Array)
#17 /home/basecooking/orders.basecooking.se/vendor/magento/framework/EntityManager/EntityManager.php(87): Magento\Framework\EntityManager\Operation\Update->execute(Object(Magento\Catalog\Model\Product\Interceptor), Array)
#18 /home/basecooking/orders.basecooking.se/vendor/magento/module-catalog/Model/ResourceModel/Product.php(695): Magento\Framework\EntityManager\EntityManager->save(Object(Magento\Catalog\Model\Product\Interceptor))
#19 /home/basecooking/orders.basecooking.se/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Catalog\Model\ResourceModel\Product->save(Object(Magento\Catalog\Model\Product\Interceptor))
#20 /home/basecooking/orders.basecooking.se/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Catalog\Model\ResourceModel\Product\Interceptor->___callParent('save', Array)
#21 /home/basecooking/orders.basecooking.se/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'save', Object(Magento\Catalog\Model\ResourceModel\Product\Interceptor), Array, 'apply_catalog_r...')