What is the least amount of effort needed to ensure no copyright issue of using online pictures in lecture notes/slides
Use images that have a CC0 (public domain) license. That way, you can use them for any purposes even without having to attribute them to anyone.
For instance, use https://search.creativecommons.org/ and select the license &quot;CC0&quot;:

Or https://free-images.com/ seems to be a search engine specifically designed for CC0 images.