I have the following code to add background for the document:
\documentclass{article}
\usepackage{lipsum}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{tikz,tikzpagenodes}
\usetikzlibrary{calc,fadings}
\AddToHook{shipout/background}{
\begin{tikzpicture}[remember picture,overlay]
\node[
% path fading=north,
inner sep=0pt,outer sep=0pt,
anchor=south,opacity=.3,
] at (current page.south) {\includegraphics[width=\paperwidth]{bg.png}};
% \path[path picture={
% \node[inner sep=0pt,outer sep=0pt,anchor=south,scope fading=south] at (current page.south) {\includegraphics[width=\paperwidth]{bg.png}};
% }];
\coordinate (L) at ($(current page.north west)!.5! (current page text area.north west)$);
\coordinate (R) at ($(current page.south east)!.5! (current page text area.south east)$);
\fill[white,opacity=.5] (L) rectangle (R);
\end{tikzpicture}
}
\begin{document}
\lipsum[1-6]
\end{document}
It produced:
However, the intersection border's color transformation is too sharp! I want the image could smoothly fade to white, with multiple opacity, I have consulted this link, but it doesn't work.
The bg.png could be accessed as below(maybe example-image is okay, but its background is pure gray, I would prefer to show that on bg.png):



