I do not understand what you are asking.
You can add all of your photos to an After Effects composition. Move the control time indicator or playhead or whatever you call it five seconds into the composition. Press the keyboard shortcut to trim a layer. In the English version of AE, it's Alt+] on Windows and Opt+] on Mac.
There are dozens of tutorials on the internet for creating slide shows with After Effects. I would suggest doing a Google search.