css how to center images in a table cell

CSS
td img{
    display: block;
    margin-left: auto;
    margin-right: auto;

}
Source

Also in CSS: