However, in my deployment (using Distillery and Gigalixir; will be adding build tools after this), the screen shows “Internal Server Error” and my log shows this bug:
[error] #PID<0.3359.0> running Code6000Web.Endpoint (connection #PID<0.3358.0>, stream id 1) terminated
request_id=180e6a277cd41582489352d361c34291 [info] GET /
Request: GET /
Server: code6000.dev:80 (http)
:erlang.binary_part("", {0, 2})
(ArgumentError) argument error
(exit) an exception was raised:
(fastimage) lib/fastimage.ex:199: Fastimage.get_acc_with_type/3
(code6000) lib/code6000_web/templates/home/1._header.html.eex:20: anonymous fn/2 in Code6000Web.HomeView."1._header.html"/1
(fastimage) lib/fastimage.ex:153: Fastimage.size/2
(fastimage) lib/fastimage.ex:213: Fastimage.info/3
(code6000) lib/code6000_web/templates/home/1._header.html.eex:20: anonymous fn/2 in Code6000Web.HomeView."1._header.html"/1
(elixir) lib/enum.ex:1948: Enum."-reduce/3-lists^foldl/2-0-"/3
(code6000) lib/code6000_web/views/home_view.ex:7: Code6000Web.HomeView.ratio/1
(code6000) lib/code6000_web/templates/home/1._header.html.eex:15: Code6000Web.HomeView."1._header.html"/1
request_id=180e6a277cd41582489352d361c34291 [info] Sent 500 in 745µs
request_id=180e6a277cd41582489352d361c34291 [info] Converted error :badarg to 500 response
Didn’t have this issue before I added .webp assets.
Now tried your switch. Still not working.
Same error in log w/ a few new lines:
"/app/lib/code6000-0.1.0/priv/static/images/past_work/1.webp"
** (File.Error) could not list directory "/tmp/build/_build/prod/lib/code6000/priv/static/images/past_work"