function isMediaUrl (url) {
  // Check for media patterns from config
  if (config.mediaPatterns) {
    for (const patternGroup of config.mediaPatterns) {
      for (const pattern of patternGroup.patterns) {
        const regex = new RegExp(pattern, 'i')
        if (regex.test(url)) return true
      }
    }
  }

  return false
}
Checks if a URL is a media file or hosted on a media platform based on configured patterns
@param {String} url - URL to check
@returns {Boolean} - true if it's likely a media URL