It’s due to AAM (Advanced Access Manager) plugin. You have different options to fix the issue.
1) Disable AAM Media Manager plugin 2) You can changes AAM Media Manager plugin version 3) If you do not want AAM to handle your website images, Go to the following file /advanced-access-manager/extension/AAM_Media_Manager/extension.php and find private $_skip = false; change above to private $_skip = TRUE;
Please refer this link for more details.
https://wordpress.org/support/topic/aam-changing-all-image-urls-to-aam_media