How much of an academic presentation should be spent on preliminaries? Considering a presentation is for a group of academics whose specialties are to some (unknown) extent related to the topic, how much of the talk should be spent on explaining the preliminaries?

I often have this problem when preparing slides for a talk where I know that my audience is a group of professors, postdocs, or/and graduate students in the same field or related fields, but I don't know how much background they have on the topic of discussion. The preliminaries are usually topics that could be covered in an upper-level undergrad course (or a first course on that specific topic), but are not a core topic in the field. I know that there could be academics out there who are either not acquainted with the topic or they need a refresher for their knowledge of the material, but I also know that with a very high probability, a considerable number of audience are so comfortable and deeply familiar with the topic that the preliminaries would be extremely boring and trivial for them (and I'm even afraid that it might sound offensively easy to them, especially when it is presented by a student). 

Should I just skip the slides on prelims in such cases, or should I always consider the possibility that some members among the audience may be unfamiliar with the topic and the presentation would sound completely meaningless to them if I skip the prelims? I've seen both approaches in academic talks given by experienced professors, so I'm confused about how they decide when to choose which approach.
There isn't really an easy answer to this; it comes with experience.  Over time you get to develop a sense of "standard things" that you can expect your audience will know.  Sometimes you'll err in one direction or another, and that's just life.  And you can't expect to please your entire audience with every part of your talk.  No matter what you do, some parts will be trivial to some listeners, and other parts will be inaccessible to others.

In the meantime, if you're a student, you have an advisor, and that's a source of experience for you to draw on.  Go over the talk in advance with your advisor, and ask for their advice as to whether you have too much or too little detail on preliminaries.

One very rough rule of thumb is to assume your audience knows any topic that would be covered in a typical first-year graduate course in your field, particularly if it's the sort of course that everyone would be expected to take.