Convert image all

Convert image all [Paid] 5.7

No permission to buy ($35.00)
After 15.5 hours of processing this addon, I now have gone through millions of old posts and was effective in turning everything into attachments. Fantastic!

My question now is, if I have your other addon:

Is it really needed to keep this addon installed?
 
Does the script only move images that have an external URL address?
Or will images located on the forum's domain also be converted to /attachments/?
 
Please help me...
I have error


Code:
ImagickException: Optimize image layers failed src/XF/Image/Imagick.php:275

#0 src/XF/Image/Imagick.php(275): Imagick->optimizeImageLayers()
#1 src/XF/Service/Attachment/Preparer.php(251): XF\Image\Imagick->save('/home/site/www2...')
#2 src/XF/Service/Attachment/Preparer.php(56): XF\Service\Attachment\Preparer->generateAttachmentThumbnail('/home/site/www...', NULL, NULL)
#3 src/XF/Service/Attachment/Preparer.php(38): XF\Service\Attachment\Preparer->insertDataFromFile(Object(XF\FileWrapper), 0, Array)
#4 src/addons/Andy/ConvertImageAll/Job/ConvertImageAll.php(557): XF\Service\Attachment\Preparer->insertAttachment(Object(XF\Attachment\Post), Object(XF\FileWrapper), Object(xenMade\LAU\XF\Entity\User), 'b1f085da94e23e4...')
#5 src/XF/Job/AbstractRebuildJob.php(42): Andy\ConvertImageAll\Job\ConvertImageAll->rebuildById(62932643)
#6 src/XF/Job/Manager.php(260): XF\Job\AbstractRebuildJob->run(8)
#7 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#8 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#9 src/XF/Cli/Command/RunJobs.php(59): XF\Job\Manager->runQueue(true, 8)
#10 src/vendor/symfony/console/Command/Command.php(255): XF\Cli\Command\RunJobs->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 src/vendor/symfony/console/Application.php(992): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 src/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(XF\Cli\Command\RunJobs), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 src/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 src/XF/Cli/Runner.php(111): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 cmd.php(15): XF\Cli\Runner->run()
#16 {main}

array(1) {
  ["cli"] => string(56) "cmd.php xf:run-jobs --manual-only --max-execution-time 0"
}
 
@AndyB some images like the following load fine:
Code:
[IMG]https://i.postimg.cc/xkrkcKRg/IMG20240226203711.avif[/IMG]
however your addon doesn't convert it to attachment

I know it's not the usual file extension but it's already included as allowed file extension
 
Xenforo 2.2.16

Code:
Server error log
ErrorException: [E_WARNING] Undefined array key "imageOptimization" src/addons/Andy/ConvertImageAll/Job/ConvertImageAll.php:73

Stack trace
#0 src/addons/Andy/ConvertImageAll/Job/ConvertImageAll.php(73): XF::handlePhpError(2, '[E_WARNING] Und...', '/home/...', 73)
#1 src/XF/Job/AbstractRebuildJob.php(42): Andy\ConvertImageAll\Job\ConvertImageAll->rebuildById(32766)
#2 src/XF/Job/Manager.php(260): XF\Job\AbstractRebuildJob->run(8)
#3 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#4 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#5 src/XF/Admin/Controller/Tools.php(141): XF\Job\Manager->runQueue(true, 8)
#6 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#8 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#9 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2485): XF\Mvc\Dispatcher->run()
#11 src/XF.php(524): XF\App->run()
#12 admin.php(13): XF::runApp('XF\\Admin\\App')
#13 {main}

Request state
array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(53) "/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(10) "/admin.php"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(0) ""
  }
}
 
Got this error after some time and cant resume

Code:
Server error log
InvalidArgumentException: "no-cache," is not valid header name. src/vendor/guzzlehttp/psr7/src/MessageTrait.php:230

Stack trace
#0 src/vendor/guzzlehttp/psr7/src/MessageTrait.php(147): GuzzleHttp\Psr7\Response->assertHeader('no-cache,')
#1 src/vendor/guzzlehttp/psr7/src/Response.php(107): GuzzleHttp\Psr7\Response->setHeaders(Array)
#2 src/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php(81): GuzzleHttp\Psr7\Response->__construct(301, Array, Object(GuzzleHttp\Psr7\Stream), '1.0', 'Moved Permanent...')
#3 src/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(565): GuzzleHttp\Handler\EasyHandle->createResponse()
#4 [internal function]: GuzzleHttp\Handler\CurlFactory->GuzzleHttp\Handler\{closure}(Object(CurlHandle), '
')
#5 src/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(40): curl_exec(Object(CurlHandle))
#6 src/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28): GuzzleHttp\Handler\CurlHandler->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#7 src/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(37): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#8 src/vendor/guzzlehttp/guzzle/src/Middleware.php(29): GuzzleHttp\PrepareBodyMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#9 src/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(70): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#10 src/vendor/guzzlehttp/guzzle/src/Middleware.php(59): GuzzleHttp\RedirectMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#11 src/vendor/guzzlehttp/guzzle/src/HandlerStack.php(71): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#12 src/vendor/guzzlehttp/guzzle/src/Client.php(351): GuzzleHttp\HandlerStack->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#13 src/vendor/guzzlehttp/guzzle/src/Client.php(162): GuzzleHttp\Client->transfer(Object(GuzzleHttp\Psr7\Request), Array)
#14 src/vendor/guzzlehttp/guzzle/src/Client.php(182): GuzzleHttp\Client->requestAsync('get', Object(GuzzleHttp\Psr7\Uri), Array)
#15 src/vendor/guzzlehttp/guzzle/src/Client.php(95): GuzzleHttp\Client->request('get', 'https://coronad...', Array)
#16 src/addons/Andy/ConvertImageAll/Job/ConvertImageAll.php(202): GuzzleHttp\Client->__call('get', Array)
#17 src/XF/Job/AbstractRebuildJob.php(42): Andy\ConvertImageAll\Job\ConvertImageAll->rebuildById(10637643)
#18 src/XF/Job/Manager.php(260): XF\Job\AbstractRebuildJob->run(8)
#19 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#20 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#21 src/XF/Admin/Controller/Tools.php(141): XF\Job\Manager->runQueue(true, 8)
#22 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#23 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#24 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#25 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#26 src/XF/App.php(2485): XF\Mvc\Dispatcher->run()
#27 src/XF.php(524): XF\App->run()
#28 admin.php(13): XF::runApp('XF\\Admin\\App')
#29 {main}

Request state
array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(53) "/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(10) "/admin.php"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(0) ""
  }
}
 
Back
Top Bottom