Add fromResource method to StaticFile helper