As these links don't have any file extension, then I assume that we are talking about
image viewer links. In that case, note that the
Upload Filenaming option applies to the actual
filename, not the image viewer.
The image viewer that you get is probably due to SEO image URL, where the number before the ID is the name of the image (title).
dashboard/settings/system
View attachment 2668