- Added handling for file URLs using fileURLToPath for proper resolution. - Updated logic to skip relative path resolution if ref.resolved is already absolute. - Enhanced cap calculation for image loading to handle undefined maxBytes more gracefully.