@SUMIT KUMAR MISHRA, Tapas, Thanks for posting in Q&A.
From your description, I know you are getting error for publicly accessible images on SharePoint Online in Intune.
To clarify this issue, please check the following.
1.Please check the permissions. Files stored on the SharePoint all have permissions and they are private. It is necessary to verify whether the account has permissions for files SharePoint Online often requires authentication to access files, even if they are set to be publicly accessible. This can cause issues when trying to use these images in Intune, which might not be able to authenticate properly.
2.Check whether the image link is correct in the script and can be accessed by anyone.
3.Check whether the image file format is correct and try to re-upload them.
If there is any update, feel free to let me know.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.