That did the job, thank you so much!
PS: I could solve the problem by always adding square featured images to all posts, but for some other reasons I need to keep some images as a rectangle
I added the code and saved (because I do not like padding anyway) but the thumbs in the grid are still not shown properly.
All thumbs behave normal, a square is cut from the center of a rectangle image. But in the grid the rectangles are squeezed into a square shape.
Please excuse my english, normally it is ok but technical terms like this are giving my a hard time 🙂
I google “compress” an image, but I get wrong answers for that…
No idea why the grid works that way, yesterday I added an additional plugin to edit thumbnails but still all thumbs work fine except the grid ones.