Add ability to handle svg files

This commit is contained in:
Evrard Van Espen
2025-11-23 11:57:41 +00:00
parent 397159563d
commit 2feb0d6747

View File

@@ -21,7 +21,7 @@ func copyMedias() error {
}
filepath.WalkDir("posts/", func(s string, d fs.DirEntry, err error) error {
if filepath.Ext(s) == ".jpg" || filepath.Ext(s) == ".jpeg" || filepath.Ext(s) == ".png" || filepath.Ext(s) == ".mp4" {
if filepath.Ext(s) == ".jpg" || filepath.Ext(s) == ".jpeg" || filepath.Ext(s) == ".png" || filepath.Ext(s) == ".mp4" || filepath.Ext(s) == ".svg" {
newPath := strings.ReplaceAll(s, "posts/", "build/medias/")
if _, err := os.Stat(newPath); err == nil {