I am exploring ways to transform an image into grayscale or make it transparent before using it as a background in ReactJS. Is there a way to achieve this in ReactJS?
My current code snippet is shown below:
<GridListTile>
<img
style={{ -webkit-filter: grayscale(100%) }}
src={image.urls.regular}
alt={image.alt_description}
/>
</GridListTile>
I have attempted using -webkit-filter: grayscale(100%)
and the filter
property but haven't had any success.