diff --git a/lib/frenzy/pipeline/scrape_stage.ex b/lib/frenzy/pipeline/scrape_stage.ex index 39b9e9b..50292d4 100644 --- a/lib/frenzy/pipeline/scrape_stage.ex +++ b/lib/frenzy/pipeline/scrape_stage.ex @@ -152,6 +152,10 @@ defmodule Frenzy.Pipeline.ScrapeStage do @content_type_allowlist ["image/jpeg", "image/png", "image/heic", "image/heif", "image/tiff"] # convert images to data URIs so that they're stored by clients as part of the body + defp image_to_data_uri("data:" <> _ = src, _site_uri, _convert) do + src + end + defp image_to_data_uri(src, site_uri, true) do absolute_url = URI.merge(site_uri, src) |> to_string()