Try using Rails.application.config.serve_static_assets to determine insert_target