Closed Kaishiyoku closed 4 months ago
What is your antlers code?
My Antlers code looks like this:
{{ collection:projects sort="order" }}
{{ blur_hash :image="image" alt="" class="absolute w-full h-full blur-xl" }}
{{ /collection:projects }}
Sorry for the delay... is image
an assets field with max_items: 1
?
Also could I get a full stack trace? The lines you referenced seem strange.
Sorry for the delay... is
image
an assets field withmax_items: 1
?
Yes it is.
Also could I get a full stack trace? The lines you referenced seem strange.
Here's the full stack trace:
[2024-06-13 18:10:28] local.ERROR: exif_imagetype(): Argument #1 ($filename) must not contain any null bytes {"userId":"3dbfaf52-7660-46f6-9578-dc9eb7d19e58","exception":"[object] (ValueError(code: 0): exif_imagetype(): Argument #1 ($filename) must not contain any null bytes at D:\\[...]\\vendor\\bepsvpt\\blurhash\\src\\Drivers\\GdDriver.php:58)
[stacktrace]
#0 D:\\[...]\\vendor\\bepsvpt\\blurhash\\src\\Drivers\\GdDriver.php(58): exif_imagetype('BM6,\"\\x00\\x00\\x00\\x00\\x006\\x00\\x00\\x00(...')
#1 D:\\[...]\\vendor\\bepsvpt\\blurhash\\src\\Drivers\\Driver.php(45): Bepsvpt\\Blurhash\\Drivers\\GdDriver->read('BM6,\"\\x00\\x00\\x00\\x00\\x006\\x00\\x00\\x00(...')
#2 D:\\[...]\\vendor\\bepsvpt\\blurhash\\src\\BlurHash.php(337): Bepsvpt\\Blurhash\\Drivers\\Driver->colors('BM6,\"\\x00\\x00\\x00\\x00\\x006\\x00\\x00\\x00(...')
#3 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Support\\Facades\\Facade.php(357): Bepsvpt\\Blurhash\\BlurHash->encode('BM6,\"\\x00\\x00\\x00\\x00\\x006\\x00\\x00\\x00(...')
#4 D:\\[...]\\vendor\\thoughtco\\statamic-blurhash\\src\\Tags\\BlurHash.php(32): Illuminate\\Support\\Facades\\Facade::__callStatic('encode', Array)
#5 D:\\[...]\\vendor\\thoughtco\\statamic-blurhash\\src\\Tags\\BlurHash.php(62): Thoughtco\\BlurHash\\Tags\\BlurHash->encode()
#6 [internal function]: Thoughtco\\BlurHash\\Tags\\BlurHash->index()
#7 D:\\[...]\\vendor\\statamic\\cms\\src\\View\\Antlers\\Language\\Runtime\\NodeProcessor.php(1597): call_user_func(Array)
#8 D:\\[...]\\vendor\\statamic\\cms\\src\\View\\Antlers\\Language\\Runtime\\NodeProcessor.php(2324): Statamic\\View\\Antlers\\Language\\Runtime\\NodeProcessor->reduce(Array)
#9 D:\\[...]\\vendor\\statamic\\cms\\src\\View\\Antlers\\Language\\Runtime\\NodeProcessor.php(750): Statamic\\View\\Antlers\\Language\\Runtime\\NodeProcessor->reduce(Array)
#10 D:\\[...]\\vendor\\statamic\\cms\\src\\View\\Antlers\\Language\\Runtime\\RuntimeParser.php(381): Statamic\\View\\Antlers\\Language\\Runtime\\NodeProcessor->render(Array)
#11 D:\\[...]\\vendor\\statamic\\cms\\src\\View\\Antlers\\Language\\Runtime\\RuntimeParser.php(773): Statamic\\View\\Antlers\\Language\\Runtime\\RuntimeParser->renderText('<div\\n x-data...', Array)
#12 D:\\[...]\\vendor\\statamic\\cms\\src\\View\\Antlers\\Engine.php(93): Statamic\\View\\Antlers\\Language\\Runtime\\RuntimeParser->parseView('D:\\\\GitHub\\\\andre...', '<div\\n x-data...', Array)
#13 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\View\\View.php(208): Statamic\\View\\Antlers\\Engine->get('D:\\\\GitHub\\\\andre...', Array)
#14 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\View\\View.php(191): Illuminate\\View\\View->getContents()
#15 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\View\\View.php(160): Illuminate\\View\\View->renderContents()
#16 D:\\[...]\\vendor\\statamic\\cms\\src\\View\\View.php(104): Illuminate\\View\\View->render()
#17 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Responses\\DataResponse.php(146): Statamic\\View\\View->render()
#18 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Responses\\DataResponse.php(42): Statamic\\Http\\Responses\\DataResponse->contents()
#19 D:\\[...]\\vendor\\statamic\\cms\\src\\Structures\\Page.php(420): Statamic\\Http\\Responses\\DataResponse->toResponse(Object(Illuminate\\Http\\Request))
#20 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(900): Statamic\\Structures\\Page->toResponse(Object(Illuminate\\Http\\Request))
#21 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(885): Illuminate\\Routing\\Router::toResponse(Object(Illuminate\\Http\\Request), Object(Statamic\\Structures\\Page))
#22 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(805): Illuminate\\Routing\\Router->prepareResponse(Object(Illuminate\\Http\\Request), Object(Statamic\\Structures\\Page))
#23 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(144): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#24 D:\\[...]\\vendor\\statamic\\cms\\src\\StaticCaching\\Middleware\\Cache.php(61): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#25 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\StaticCaching\\Middleware\\Cache->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#26 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\AuthGuard.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#27 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\AuthGuard->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#28 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\AddViewPaths.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#29 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\AddViewPaths->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#30 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\Localize.php(38): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#31 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\Localize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#32 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\HandleToken.php(13): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#33 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\HandleToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#34 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\StacheLock.php(29): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#35 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\StacheLock->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#36 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#37 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#38 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken.php(88): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#39 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#40 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\View\\Middleware\\ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#41 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#42 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#43 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest(Object(Illuminate\\Http\\Request), Object(Illuminate\\Session\\Store), Object(Closure))
#44 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#45 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#46 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#47 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\EncryptCookies.php(75): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#48 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#49 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#50 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(805): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#51 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(784): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#52 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(748): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#53 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(737): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#54 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(200): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#55 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(144): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#56 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\StopImpersonating.php(12): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#57 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\StopImpersonating->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#58 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\DisableFloc.php(17): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#59 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\DisableFloc->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#60 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\CheckMultisite.php(15): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#61 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\CheckMultisite->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#62 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\CheckComposerJsonScripts.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#63 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\CheckComposerJsonScripts->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#64 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\PoweredByHeader.php(18): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#65 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\PoweredByHeader->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#66 D:\\[...]\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php(59): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#67 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#68 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#69 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#70 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#71 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#72 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php(51): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#73 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#74 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#75 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#76 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php(110): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#77 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#78 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#79 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Http\\Middleware\\HandleCors->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#80 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#81 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Http\\Middleware\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#82 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#83 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(175): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#84 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(144): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#85 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(1183): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#86 D:\\[...]\\public\\index.php(17): Illuminate\\Foundation\\Application->handleRequest(Object(Illuminate\\Http\\Request))
#87 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\resources\\server.php(16): require_once('D:\\\\GitHub\\\\andre...')
#88 {main}
"}
Oh thats annoying, feels like something has changed in the upstream dependency.
If you change this line: https://github.com/thoughtco/statamic-blurhash/blob/2e1bc6cff44a2d47f74d89baf901a962eba5b0c7/src/Tags/BlurHash.php#L29
to
$image = $image->path();
Does that change anything?
Now the file isn't being found:
exif_imagetype(untitled.bmp): Failed to open stream: No such file or directory
If I dump out $image->path()
it just returns the filename with its file extension; no real filepath gets returned.
ah my bad, try $image->resolvedPath()
?
Now I'm getting the following exception: Call to undefined method GdImage::encode()
[2024-06-14 12:21:02] local.ERROR: Call to undefined method GdImage::encode() {"userId":"3dbfaf52-7660-46f6-9578-dc9eb7d19e58","exception":"[object] (Error(code: 0): Call to undefined method GdImage::encode() at D:\\[...]\\vendor\\thoughtco\\statamic-blurhash\\src\\Tags\\BlurHash.php:51)
[stacktrace]
#0 D:\\[...]\\vendor\\thoughtco\\statamic-blurhash\\src\\Tags\\BlurHash.php(79): Thoughtco\\BlurHash\\Tags\\BlurHash->decode('L9IoNxKRN1stXra...')
#1 [internal function]: Thoughtco\\BlurHash\\Tags\\BlurHash->index()
#2 D:\\[...]\\vendor\\statamic\\cms\\src\\View\\Antlers\\Language\\Runtime\\NodeProcessor.php(1597): call_user_func(Array)
#3 D:\\[...]\\vendor\\statamic\\cms\\src\\View\\Antlers\\Language\\Runtime\\NodeProcessor.php(2324): Statamic\\View\\Antlers\\Language\\Runtime\\NodeProcessor->reduce(Array)
#4 D:\\[...]\\vendor\\statamic\\cms\\src\\View\\Antlers\\Language\\Runtime\\NodeProcessor.php(750): Statamic\\View\\Antlers\\Language\\Runtime\\NodeProcessor->reduce(Array)
#5 D:\\[...]\\vendor\\statamic\\cms\\src\\View\\Antlers\\Language\\Runtime\\RuntimeParser.php(381): Statamic\\View\\Antlers\\Language\\Runtime\\NodeProcessor->render(Array)
#6 D:\\[...]\\vendor\\statamic\\cms\\src\\View\\Antlers\\Language\\Runtime\\RuntimeParser.php(773): Statamic\\View\\Antlers\\Language\\Runtime\\RuntimeParser->renderText('<div\\n x-data...', Array)
#7 D:\\[...]\\vendor\\statamic\\cms\\src\\View\\Antlers\\Engine.php(93): Statamic\\View\\Antlers\\Language\\Runtime\\RuntimeParser->parseView('D:\\\\GitHub\\\\andre...', '<div\\n x-data...', Array)
#8 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\View\\View.php(208): Statamic\\View\\Antlers\\Engine->get('D:\\\\GitHub\\\\andre...', Array)
#9 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\View\\View.php(191): Illuminate\\View\\View->getContents()
#10 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\View\\View.php(160): Illuminate\\View\\View->renderContents()
#11 D:\\[...]\\vendor\\statamic\\cms\\src\\View\\View.php(104): Illuminate\\View\\View->render()
#12 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Responses\\DataResponse.php(146): Statamic\\View\\View->render()
#13 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Responses\\DataResponse.php(42): Statamic\\Http\\Responses\\DataResponse->contents()
#14 D:\\[...]\\vendor\\statamic\\cms\\src\\Structures\\Page.php(420): Statamic\\Http\\Responses\\DataResponse->toResponse(Object(Illuminate\\Http\\Request))
#15 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(900): Statamic\\Structures\\Page->toResponse(Object(Illuminate\\Http\\Request))
#16 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(885): Illuminate\\Routing\\Router::toResponse(Object(Illuminate\\Http\\Request), Object(Statamic\\Structures\\Page))
#17 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(805): Illuminate\\Routing\\Router->prepareResponse(Object(Illuminate\\Http\\Request), Object(Statamic\\Structures\\Page))
#18 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(144): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#19 D:\\[...]\\vendor\\statamic\\cms\\src\\StaticCaching\\Middleware\\Cache.php(61): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#20 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\StaticCaching\\Middleware\\Cache->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#21 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\AuthGuard.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#22 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\AuthGuard->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#23 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\AddViewPaths.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#24 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\AddViewPaths->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#25 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\Localize.php(38): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#26 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\Localize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#27 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\HandleToken.php(13): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#28 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\HandleToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#29 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\StacheLock.php(29): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#30 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\StacheLock->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#31 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#32 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#33 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken.php(88): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#34 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#35 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\View\\Middleware\\ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#36 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#37 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#38 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest(Object(Illuminate\\Http\\Request), Object(Illuminate\\Session\\Store), Object(Closure))
#39 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#40 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#41 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#42 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\EncryptCookies.php(75): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#43 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#44 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#45 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(805): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#46 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(784): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#47 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(748): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#48 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(737): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#49 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(200): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#50 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(144): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#51 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\StopImpersonating.php(12): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#52 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\StopImpersonating->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#53 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\DisableFloc.php(17): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#54 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\DisableFloc->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#55 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\CheckMultisite.php(15): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#56 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\CheckMultisite->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#57 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\CheckComposerJsonScripts.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#58 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\CheckComposerJsonScripts->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#59 D:\\[...]\\vendor\\statamic\\cms\\src\\Http\\Middleware\\PoweredByHeader.php(18): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#60 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Statamic\\Http\\Middleware\\PoweredByHeader->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#61 D:\\[...]\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php(59): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#62 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#63 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#64 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#65 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#66 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#67 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php(51): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#68 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#69 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#70 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#71 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php(110): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#72 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#73 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#74 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Http\\Middleware\\HandleCors->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#75 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#76 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(183): Illuminate\\Http\\Middleware\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#77 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#78 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(175): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#79 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(144): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#80 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(1183): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#81 D:\\[...]\\public\\index.php(17): Illuminate\\Foundation\\Application->handleRequest(Object(Illuminate\\Http\\Request))
#82 D:\\[...]\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\resources\\server.php(16): require_once('D:\\\\GitHub\\\\andre...')
#83 {main}
"}
$image = BlurHashFacade::decode($encodedString, $width, $height);
in fact returns a GdImage
object.
Sorry for the delay - I was at flat camp and only just back.
I've just tested locally on Herd (mac) and it's working for me without any issue:
{{ blur_hash :image="settings:assets_field" alt="aaa" class="absolute w-full h-full blur-xl" }}
My assets field:
Output:
I don't have access to a windows environment but I'm wondering if that might be the issue. Are you able to try on a non-windows environment?
I can give it a try on Linux tomorrow. Thank you for your help :)
I tried it out on Codespaces, same issue:
exif_imagetype(): Argument #1 ($filename) must not contain any null bytes
Maybe it's an issue with my image but I also tried other files. I will test it out on my Ubuntu Raspberry Pi tomorrow.
Okay, I tested it under Linux and still get the same exception. I'm on PHP 8.2.20, Laravel 11.10.0 and Statamic 5. Everything worked fine on Statamic 4/Laravel 10 though.
Ok it seems to be related to the blur hash dependency v3, not sure how you were getting it as we're locked to v2. I've added a branch for the changes required: https://github.com/thoughtco/statamic-blurhash/pull/4
Can you test and see if these work for you?
I ran composer require thoughtco/statamic-blurhash
and it required the following dependencies:
Lock file operations: 2 installs, 0 updates, 0 removals
- Locking bepsvpt/blurhash (3.0.1)
- Locking thoughtco/statamic-blurhash (1.2.0)
I looked on https://packagist.org/packages/thoughtco/statamic-blurhash and just saw that v1.1.0 used blurhash v2 while v1.2.0 uses blurhash v3. I haven't updated my Composer dependencies for a while. This explains why it worked before I tried to upgrade to Statamic 5 because at that point I also updated. all other dependencies.
I will test out your pull request now.
I tried a dozen of images and every time I get this exception:
See
Bepsvpt\Blurhash\Drivers\GdDriver:58
andThoughco\BlurHash\Tags\BlurHash:32
.I'm using Statamic 5, Laravel 11 and PHP 8.2 on Windows.