520 Errors in Magento Admin Panel in Category Thumbnails

We have an issue when we try to add images to our categories in magento 2.3.4 where it appears that cloudflare is keeping our thumbnails (generated on the fly) from loading properly.

I am seeing lots of 520 errors in the consol (for all of the thumbnails that fail to display).

They look like this one:
GET https://www.americanlegacyfishing.com/admin_alfc/cms/wysiwyg_images/thumbnail/file/SG9vZGllc18xMjQweDQyMC5qcGc-/ 520
Image (async)
(anonymous) @ jquery.js:429
access @ jquery.js:287
html @ jquery.js:428
(anonymous) @ browser.js:6
fire @ jquery.js:221
fireWith @ jquery.js:227
done @ jquery.js:650
callback @ jquery.js:677
XMLHttpRequest.send (async)
(anonymous) @ VM26259:1
send @ jquery.js:674
ajax @ jquery.js:643
loadFileList @ browser.js:6
(anonymous) @ jquery-ui-1.9.2.js:26
_selectNode @ browser.js:5
(anonymous) @ jquery-ui-1.9.2.js:26
proxy @ jquery.js:37
dispatch @ jquery.js:351
elemData.handle @ jquery.js:324
trigger @ jquery.js:345
jQuery.event.trigger @ jquery-migrate.js:54
triggerHandler @ jquery.js:395
__callback @ jquery.jstree.js:31
select_node @ jquery.jstree.js:190
$.jstree._fn. @ jquery.jstree.js:31
(anonymous) @ jquery.jstree.js:17
each @ jquery.js:27
each @ jquery.js:15
$.fn.jstree @ jquery.jstree.js:17
(anonymous) @ folder-tree.js:2
open_node @ jquery.jstree.js:109
$.jstree._fn. @ jquery.jstree.js:31
(anonymous) @ jquery.jstree.js:104
(anonymous) @ jquery.jstree.js:245
success_func @ jquery.jstree.js:266
fire @ jquery.js:221
fireWith @ jquery.js:227
done @ jquery.js:650
callback @ jquery.js:677
XMLHttpRequest.send (async)
(anonymous) @ VM26259:1
send @ jquery.js:674
ajax @ jquery.js:643
load_node_json @ jquery.jstree.js:271
$.jstree._fn. @ jquery.jstree.js:31
load_node @ jquery.jstree.js:245
$.jstree._fn. @ jquery.jstree.js:31
$.jstree._fn. @ jquery.jstree.js:31
open_node @ jquery.jstree.js:104
$.jstree._fn. @ jquery.jstree.js:31
(anonymous) @ jquery.jstree.js:17
each @ jquery.js:27
each @ jquery.js:15
$.fn.jstree @ jquery.jstree.js:17
recursiveOpen @ folder-tree.js:2
open_node @ jquery.jstree.js:109
$.jstree._fn. @ jquery.jstree.js:31
(anonymous) @ jquery.jstree.js:104
(anonymous) @ jquery.jstree.js:245
success_func @ jquery.jstree.js:266
fire @ jquery.js:221
fireWith @ jquery.js:227
done @ jquery.js:650
callback @ jquery.js:677
XMLHttpRequest.send (async)
(anonymous) @ VM26259:1
send @ jquery.js:674
ajax @ jquery.js:643
load_node_json @ jquery.jstree.js:271
$.jstree._fn. @ jquery.jstree.js:31
load_node @ jquery.jstree.js:245
$.jstree._fn. @ jquery.jstree.js:31
$.jstree._fn. @ jquery.jstree.js:31
open_node @ jquery.jstree.js:104
$.jstree._fn. @ jquery.jstree.js:31
(anonymous) @ jquery.jstree.js:17
each @ jquery.js:27
each @ jquery.js:15
$.fn.jstree @ jquery.jstree.js:17
recursiveOpen @ folder-tree.js:2
open_node @ jquery.jstree.js:109
$.jstree._fn. @ jquery.jstree.js:31
(anonymous) @ jquery.jstree.js:104
(anonymous) @ jquery.jstree.js:245
success_func @ jquery.jstree.js:266
fire @ jquery.js:221
fireWith @ jquery.js:227
done @ jquery.js:650
callback @ jquery.js:677
XMLHttpRequest.send (async)
(anonymous) @ VM26259:1
send @ jquery.js:674
ajax @ jquery.js:643
load_node_json @ jquery.jstree.js:271
$.jstree._fn. @ jquery.jstree.js:31
load_node @ jquery.jstree.js:245
$.jstree._fn. @ jquery.jstree.js:31
$.jstree._fn. @ jquery.jstree.js:31
open_node @ jquery.jstree.js:104
$.jstree._fn. @ jquery.jstree.js:31
(anonymous) @ jquery.jstree.js:17
each @ jquery.js:27
each @ jquery.js:15
$.fn.jstree @ jquery.jstree.js:17
recursiveOpen @ folder-tree.js:2
treeLoaded @ folder-tree.js:2
(anonymous) @ jquery-ui-1.9.2.js:26
proxy @ jquery.js:37
dispatch @ jquery.js:351
elemData.handle @ jquery.js:324
trigger @ jquery.js:345
jQuery.event.trigger @ jquery-migrate.js:54
triggerHandler @ jquery.js:395
__callback @ jquery.jstree.js:31
loaded @ jquery.jstree.js:83
$.jstree._fn. @ jquery.jstree.js:31
(anonymous) @ jquery.jstree.js:70
(anonymous) @ jquery.jstree.js:245
load_node_json @ jquery.jstree.js:258
$.jstree._fn. @ jquery.jstree.js:31
load_node @ jquery.jstree.js:245
$.jstree._fn. @ jquery.jstree.js:31
$.jstree._fn. @ jquery.jstree.js:31
init @ jquery.jstree.js:70
$.jstree._fn. @ jquery.jstree.js:31
(anonymous) @ jquery.jstree.js:21
setTimeout (async)
(anonymous) @ jquery.jstree.js:21
each @ jquery.js:27
each @ jquery.js:15
$.fn.jstree @ jquery.jstree.js:18
_create @ folder-tree.js:1
(anonymous) @ jquery-ui-1.9.2.js:26
_createWidget @ jquery-ui-1.9.2.js:33
$.. @ jquery-ui-1.9.2.js:26
$.. @ jquery-ui-1.9.2.js:25
(anonymous) @ main.js:2
execCb @ require.js:114
context.execCb @ resolver.js:11
check @ require.js:56
(anonymous) @ require.js:73
(anonymous) @ require.js:11
(anonymous) @ require.js:75
each @ require.js:3
emit @ require.js:75
check @ require.js:61
enable @ require.js:74
init @ require.js:54
callGetModule @ require.js:75
completeLoad @ require.js:105
onScriptLoad @ require.js:114
load (async)
req.load @ require.js:121
load @ require.js:114
load @ require.js:55
fetch @ require.js:55
check @ require.js:56
enable @ require.js:74
enable @ require.js:103
(anonymous) @ require.js:74
(anonymous) @ require.js:11
each @ require.js:3
enable @ require.js:72
init @ require.js:54
(anonymous) @ require.js:99
setTimeout (async)
req.nextTick @ require.js:119
localRequire @ require.js:99
window.require @ mixins.js:21
init @ main.js:1
(anonymous) @ main.js:6
.each..forEach @ underscore.js:7
(anonymous) @ main.js:5
apply @ main.js:5
(anonymous) @ mage.js:1
dispatch @ jquery.js:351
elemData.handle @ jquery.js:324
trigger @ jquery.js:345
jQuery.event.trigger @ jquery-migrate.js:54
(anonymous) @ jquery.js:395
each @ jquery.js:27
each @ jquery.js:15
trigger @ jquery.js:395
(anonymous) @ browser.js:5
fire @ jquery.js:221
fireWith @ jquery.js:227
done @ jquery.js:650
callback @ jquery.js:677
XMLHttpRequest.send (async)
(anonymous) @ VM26259:1
send @ jquery.js:674
ajax @ jquery.js:643
openDialog @ browser.js:5
openMediaBrowserDialog @ image-uploader.js:5
(anonymous) @ knockout.js:367
dispatch @ jquery.js:351
elemData.handle @ jquery.js:324

If I click the link the thumbnail loads correctly, but it’s not loading via the GET command. This makes me think that cloudflare is likely the culprit since the 520 error is a cloudflare error when I view it.

I have tried setting a rule for the path:

bypass cache, and disable security, but that didn’t help.

Do any of you have any insight on how to get around this issue?
Thanks,
Vi

Have you tried deactivating Cloudflare on the site to see if that fixes it?

Also, community tip for 520 errors in case you haven’t seen it:

I was aware that the 520 error is a generic error saying that the server didn’t respond as expected. I did turn off the always online using that same rule per this recommendation (5), but it didn’t make any difference in the behavior.

ps. I will disable cloudflare temporarily when we don’t have such a high load as we do right now to be 100% certain that it’s cloudflare causing the behavior.