Don't try to convert data URIs to data URIs
This commit is contained in:
parent
1c2ef3bc51
commit
6916647737
|
@ -152,6 +152,10 @@ defmodule Frenzy.Pipeline.ScrapeStage do
|
||||||
@content_type_allowlist ["image/jpeg", "image/png", "image/heic", "image/heif", "image/tiff"]
|
@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
|
# 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
|
defp image_to_data_uri(src, site_uri, true) do
|
||||||
absolute_url = URI.merge(site_uri, src) |> to_string()
|
absolute_url = URI.merge(site_uri, src) |> to_string()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue