   defp append_class(base, nil), do: base
   defp append_class(base, ""), do: base
   defp append_class(base, class) when is_binary(class), do: base <> " " <> class
+
+  defp append_query(avatar_url, map) do
+    uri = URI.parse(avatar_url)
+
+    new_query =
+      uri.query
+      |> URI.decode_query(map)
+      |> URI.encode_query()
+
+    uri
+    |> Map.replace(:query, new_query)
+    |> to_string()
+  end
 end

      :img,
      alt: user.name,
      class: "avatar",
      src: "#{user.avatar_url}&s=#{size}",
      width: size,
      height: size
    )

  """
  @spec underline_nav_item(String.t(), String.t(), Keyword.t()) :: Phoenix.HTML.safe()
  def underline_nav_item(text, link, options \\ []) do
    count = options[:counter]
    selected = options[:selected]

    class =
