diff --git src/js/_enqueues/vendor/plupload/handlers.js src/js/_enqueues/vendor/plupload/handlers.js
index fbf1012f9c..0e8280ba46 100644
--- src/js/_enqueues/vendor/plupload/handlers.js
+++ src/js/_enqueues/vendor/plupload/handlers.js
@@ -427,7 +427,7 @@ jQuery( document ).ready( function( $ ) {
 	});
 
 	// Attempt to create image sub-sizes when an image was uploaded successfully
-	// but the server responded with HTTP 500 error.
+	// but the server responded with an HTTP 500 or 502 error.
 	tryAgain = function( up, error ) {
 		var file = error.file;
 		var times;
@@ -465,7 +465,7 @@ jQuery( document ).ready( function( $ ) {
 				}
 			});
 
-			if ( error.message && error.status !== 500 ) {
+			if ( error.message && error.status !== 500 && error.status !== 502  ) {
 				wpQueueError( error.message );
 			} else {
 				wpQueueError( pluploadL10n.http_error_image );
@@ -505,7 +505,7 @@ jQuery( document ).ready( function( $ ) {
 			}
 		}).fail( function( jqXHR ) {
 			// If another HTTP 500 error, try try again...
-			if ( jqXHR.status === 500 ) {
+			if ( jqXHR.status === 500 || jqXHR.status === 502 ) {
 				tryAgain( up, error );
 				return;
 			}
@@ -582,8 +582,8 @@ jQuery( document ).ready( function( $ ) {
 			var isImage = error.file && error.file.type && error.file.type.indexOf( 'image/' ) === 0;
 			var status  = error && error.status;
 
-			// If the file is an image and the error is HTTP 500 try to create sub-sizes again.
-			if ( status === 500 && isImage ) {
+			// If the file is an image and the error is HTTP 500 or 502 try to create sub-sizes again.
+			if ( ( status === 500 || status === 502 ) && isImage ) {
 				tryAgain( up, error );
 				return;
 			}
