(WordPress)- How to download pictures without opening in WordPress?

(WordPress)- How to download pictures without opening in WordPress?

(WordPress)- How to download pictures without opening in WordPress?

Kimo, which was often used in the past, and now Yahoo intellectuals, also stopped serving this year. I thought I would sort it out by myself, and I would also publish an English version for practicing English. If there is a grammatical error, please include more.

 

One cause:

Sometimes I don’t want to open the picture, just click it and download it.

Two solutions:

Method 1:

In the Gutenberg block editor, use the “File” tool, as shown in the figure below, to download the picture without installing a plug-in.

Method 2:

Add a paragraph of JQ grammar, as follows:

<script> 
jQuery(function($) { 
$('a[href$=".jpg"]').attr("download","");
}); 
</script> 

 

PS:

1. In the grammar, jpg is used. You can also copy another sentence and change it to png and paste it on the next line of the line.

$('a[href$=".png"]').attr("download","");

2. For the location of the grammar, use a custom html block at the bottom of the page and add the grammar. If you use Elementor the same way, just paste the grammar in the html tool.

 

 

 

Disclaimer:

1. This image file is collected and reproduced from the Internet, and does not assume any technical and copyright issues.

2. If there is a download link for broadband testing and research purposes only, please delete it within 24 hours after downloading, and do not use it for commercial use.

3. If you have violated your legal rights, please write to us and we will delete it in time. We apologize for the inconvenience caused to you.



發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *