def image_resize(url, options) do
with executable when is_binary(executable) <- System.find_executable("convert"),
{:ok, args} <- prepare_image_resize_args(options),
- url = Pleroma.Web.MediaProxy.url(url),
- {:ok, env} <- Pleroma.HTTP.get(url),
+ {:ok, env} <- Pleroma.HTTP.get(url, [], [adapter: [pool: :preview]]),
{:ok, fifo_path} <- mkfifo() do
args = List.flatten([fifo_path, args])
run_fifo(fifo_path, env, executable, args)
def video_framegrab(url) do
with executable when is_binary(executable) <- System.find_executable("ffmpeg"),
- url = Pleroma.Web.MediaProxy.url(url),
- {:ok, env} <- Pleroma.HTTP.get(url),
+ {:ok, env} <- Pleroma.HTTP.get(url, [], [adapter: [pool: :preview]]),
{:ok, fifo_path} <- mkfifo(),
args = [
"-y",