Appending and removing attributes

This is what I want to happen:
when a user clicks on an image it should put a box-shadow, set to filter to none, and reveal a new content section. I have accomplished the latter part but I can’t seem to solve to rest. I tried to use setAttribute() to append an id styling to the element when clicked. Then, I try to use removeAttribute() but it doesn’t remove it. Please Help!

function displayContent(param1, param2) {
  const imageInfo = document.getElementById(param1);
  const image = document.getElementById(param2);
  const displayValue = imageInfo.style.display;
  console.log("Display value is:" + displayValue);
  if (displayValue === "block") {
    imageInfo.style.display = "none";
    image.removeAttribute("id");
    // image.style.boxShadow = "none";
    // image.style.filter = "grayscale(80%)";
  } else {
    imageInfo.style.display = "block";
    image.setAttribute("id", "expand");
    // image.style.boxShadow = "10px 10px 5px #888";
    // image.style.filter = "none";
  }
}

#expand {
  filter: none;
  box-shadow: 10px 10px 10px;
}