The error "Failed to construct 'URL': Invalid URL" indicates that the URL constructor is passed an invalid string. Maybe setCoverImagePath()
passes the string containing the custom protocol as path
argument to new URL()
? In that case, you'd have to find an alternative implementation to set the image path, without using new URL()
.