def includes_generated_image?(relative_path)
    # Treat root relative urls (without a protocol) like normal if they start with  the images path.
    if relative_path.start_with?("#{http_generated_images_path}/")
      relative_path = relative_path[(http_generated_images_path.size + 1)..-1]
    end