Here is a workaround for you refer to.
Steps:
1.Create a new permission level. Go to Site permissions -> Permission Levels -> Click Edit permission -> Copy Permission Level -> Uncheck "Manage Lists - Create and delete lists, add or remove columns in a list, and add or remove public views of a list." -> Create.
2.Go to the Library settings -> Permissions for this document library -> Stop Inheriting Permissions -> Grant Permissions -> Grant students with newly created permission level.
3.Click Edit current view -> In the Filter section, set Created by is equal to [ME].
4.Result: Logged-in users can only see pictures uploaded by themselves.
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.