That solution did nothing for me. Possibly an incompatibility with the “Twenty Nineteen” theme? Previously, I tried targeting the ‘.attachment-thumbnail’ class in the custom CSS editor, but the only code the image widget would respond to was directly setting margin-left to a value, which is not ideal for perfect centering.