package handlers import "strings" // normalizeImagePath strips a legacy "storage/" prefix if present, so that // the template can safely build "/storage/{filename}" URLs regardless of // whether the database entry was stored as "uuid.jpg" or "storage/uuid.jpg". func normalizeImagePath(path string) string { return strings.TrimPrefix(path, "storage/") }