How to fix catalog images in Magento ≥ 2.3.5 in Windows?

Step 1

Replace the line:

with the following one:

if ($url && isset($url['scheme']) && !in_array($url['scheme'], $allowed_schemes) && !file_exists($filename)) {

github.com/magento/magento2/issues/28055#issuecomment-622533641

The same fix solves another problem: How to fix «Unable to apply data patch Magento\Theme\Setup\Patch\Data\RegisterThemes for module Magento_Theme» in Magento ≥ 2.3.5 in Windows?

Step 2

How to fix URLs of catalog images in Windows for Magento ≥ 2.3.0?

Step 3

How to adapt pub/get.php to Windows in Magento ≥ 2.4.2?

See also:

How to fix URLs of catalog images in Magento < 2.3 in Windows?