diff --git a/src/pydata_sphinx_theme/__init__.py b/src/pydata_sphinx_theme/__init__.py index f88f05a484..b209899b12 100644 --- a/src/pydata_sphinx_theme/__init__.py +++ b/src/pydata_sphinx_theme/__init__.py @@ -1166,6 +1166,9 @@ def copy_logo_images(app: Sphinx, exception=None) -> None: path_image = logo.get(f"image_{kind}") if not path_image or isurl(path_image): continue + if os.path.isfile(staticdir / Path(path_image).name): + # file already exists in static dir + continue if not (Path(app.srcdir) / path_image).exists(): logger.warning(f"Path to {kind} image logo does not exist: {path_image}") # Ensure templates cannot be passed for logo path to avoid security vulnerability