Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

4 sätt att förhindra stöld av images i WordPress

Letar du efter ett sätt att förhindra stöld av images i WordPress?

Stöld av images är ett vanligt problem som fotografer brottas med regelbundet. Det är mycket lätt för vem som helst att kopiera images och text på internet, så det är viktigt att skydda your originalverk.

I den här artikeln delar vi med oss av 4 sätt att förhindra stöld av images på WordPress-webbplatser.

Simple ways to prevent image theft in WordPress

Lagar om Copyright är universella och gäller över hela världen. Den ursprungliga skaparen blir automatiskt innehavare av Copyright för sitt kreativa arbete.

Även om personen inte nämner det på sin WordPress website, bör du ändå anta att det content du viewar är skyddat av upphovsrätt. Detta inkluderar images, text, videoklipp, logotyper eller någon annan form av content som du ser på webben.

Problemet är att images och text lätt kan kopieras. Många tror att ingen skulle notera om de stal en image och använde den på sin egen website.

Att stjäla andras arbete är inte bara olagligt eller ej, det är också oetiskt. Många platser erbjuder enkel tillgång till royaltyfria och offentliga domäner.

Även om det är smickrande att se andra människor använda yours arbete i sina egna projekt, kan det ibland vara mycket frustrerande att se ett uppenbart åsidosättande av dina rättigheter.

Det finns inget sätt att helt hindra människor från att stjäla dina images, men det finns många sätt att avskräcka och förhindra bildstöld på en WordPress website.

Här är de 4 vanligaste sätten att skydda dina images i WordPress och hur du kan kontrollera om din image är stulen:

1. Inaktivera högerklick

Det är enkelt att stjäla images från din website eftersom en användare helt enkelt kan högerklicka och välja ”save image as” för att downloada filerna. You can inaktivera högerklick på din website och göra det svårare för en genomsnittlig användare att stjäla din image.

Här är två tillägg som du kan använda för att inaktivera högerklick på images i WordPress.

Envira Gallery

Envira Gallery är det bästa WordPress plugin för gallerier på marknaden. Förutom att hjälpa dig att skapa beautiful image galleries, kommer Envira Gallery med massor av andra funktioner också. En av dessa funktioner är bildskydd.

Gå bara till Envira Gallery ” Addons från din WordPress adminpanel. Navigera sedan till ”Protection” addon och installera och aktivera det.

Install the protection addon

Nu skapar du ett new image gallery med Envira Gallery. Om det här är första gången för dig kan du läsa mer om hur du enkelt skapar responsiva gallerier i WordPress med Envira Gallery.

När du skapar ditt gallery, click on the ”Misc” tabs and scroll down to the Image Protection Settings. Där hittar du alternativet ”Enable Image Protection”. Gå vidare och kontrollera det här alternativet och save your gallery.

Enable image protection option

Det finns också ett alternativ för att aktivera en popup alert som kommer att visas när en användare försöker kopiera imagen.

Du kan nu lägga till detta image gallery var som helst på din WordPress site. Det kommer automatiskt att inaktivera högerklick på images.

Inaktivera högerklick för WP

Disable Right Click For WP är ett gratis WordPress tillägg som tillåter dig att inaktivera högerklick på din WordPress site.

Pluginet fungerar direkt från boxen, och det inaktiverar högerklick på hela din website. Det finns inga ytterligare inställningar att konfigurera eller ändra.

Det finns dock ett alternativ att visa ett message när en användare försöker högerklicka på en image.

Gå bara till Settings ” Disable Right Click For WP från din WordPress dashboard och aktivera alternativet ”Visa meddelanden om inaktivera händelser”.

Disable right click in WP

Glöm inte att klicka på knappen ”Save Settings” när du är klar.

2. Använd vattenstämpel på dina images i WordPress

Vattenstämplar verkar fungera bra för många webbplatser för stockfotografering. Den uppenbara nackdelen är att dina fotografier eller images kanske inte ser bäst ut.

Du kan dock add to vattenstämplar på ett smakfullt sätt. Målet är att bibehålla dina images estetiska tilltalande samtidigt som du avskräcker människor från att stjäla dem.

Envira Gallery levereras med en Watermarking addon. Du behöver minst en Plus-licens av Envira Gallery för att använda detta addon.

Installera och aktivera bara plugin-programmet Envira Gallery. För mer detaljer, vänligen se vår guide om hur man installerar ett plugin för WordPress.

Efter aktivering måste du besöka Envira Gallery ” Addons från din WordPress dashboard och sedan navigera till Watermarking addon. Gå sedan vidare och installera och aktivera addon.

Watermarking addon

När du skapar ett galleri eller redigerar ett befintligt galleri kommer du att notera den nya tabben ”Vattenmärkning” i galleriets inställningar.

Du kan klicka på checkboxen för alternativet ”Enabled Watermarking”, så visas fler alternativ.

Därefter uploadar du en vattenstämpel för dina images, väljer position och marginal och väljer om vattenstämpeln ska tillämpas på befintliga images.

Watermarking settings

Om du letar efter ett Envira Gallery-alternativ kan du också använda NextGEN Gallery plugin för att add to text eller image vattenstämplar till dina images i WordPress.

3. Inaktivera hotlinking av images i WordPress

Ett annat vanligt sätt att stjäla images från websites är att hämta dem från originalkällan. Imagen kommer att hämtas från dina servrar och visas på tredjepartswebbplatser utan din behörighet.

Detta ökar också belastningen på din server och användningen av bandbredd.

Så här inaktiverar du hotlinking av images på din WordPress site.

Lägg bara till den här koden i .htaccess-filen i root directory på din WordPress webbplats:

#disable hotlinking of images with forbidden or custom image option
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?wpbeginner.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]

Glöm inte att ersätta wpbeginner.com med ditt eget domain name.

Denna kod blockerar hotlinking samtidigt som den fortfarande allow images to be view in search results and on your website.

Kan du inte hitta .htaccess-filen? Du kan se vår tutorial om hur du hittar .htaccess-filen i WordPress.

Att lägga till ett copyright notice på din website kan också avskräcka människor från att stjäla images. Du kan helt enkelt add a copyright notice to your theme’s footer file in plain text or HTML like this:

<p>© 2009-2023 WPbeginner.com</p>
Display a Copyright Notice on Your Website

Nackdelen med detta är att du måste editera denna kod varje år. Ett bättre tillvägagångssätt är att add to ett dynamiskt copyright notice i WordPress.

Många tutorials kommer att berätta att du kan göra detta genom att lägga till kod i ditt temas functions.php-fil eller ett site-specifikt plugin.

Vi rekommenderar dock inte att du editerar filen functions.php. Om du inte är en utvecklare kan minsta misstag förstöra din site eller förstöra dess funktionalitet.

Det bästa sättet att add to custom code är genom att använda WPCode plugin. Det är det bästa pluginet för code snippet för WordPress, och du kan enkelt hantera all din kod med WPCode.

Först måste du installera och aktivera det gratis pluginet WPCode. Om du behöver hjälp kan du vänligen läsa vår guide om hur du installerar ett plugin för WordPress.

Efter aktivering måste du gå till Code Snippets ” + Add Snippet från din WordPress dashboard. Härifrån väljer du helt enkelt alternativet ”Add Your Custom Code (New Snippet)”.

Add new snippet

Följaktligen kan du ange en titel för ditt code snippet och enter följande kod i ”Code Preview” area:

function wpb_copyright() {
global $wpdb;
$copyright_dates = $wpdb->get_results("
SELECT
YEAR(min(post_date_gmt)) AS firstdate,
YEAR(max(post_date_gmt)) AS lastdate
FROM
$wpdb->posts
WHERE
post_status = 'publish'
");
$output = '';
if($copyright_dates) {
$copyright = "© " . $copyright_dates[0]->firstdate;
if($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate) {
$copyright .= '-' . $copyright_dates[0]->lastdate;
}
$output = $copyright;
}
return $output;
}
 
add_shortcode('copyright','wpb_copyright');
add_filter('widget_text', 'do_shortcode');

You will also have to click the ”Code Type” dropdown menu.

Välj sedan alternativet ”PHP Snippet”.

Add copyright code snippet

Därefter kan du rulla ner till sektionen Insertion. Som standard kommer WPCode att köra code snippet överallt på din webbplats.

Du kan dock ändra location och run koden på en specifik page, site-wide header eller footer, före ett stycke, med mera. Det finns också ett alternativ att skapa en shortcode för din custom code. På så sätt kan du manuellt enter shortcoden för att run koden.

För denna tutorial kommer vi att använda standardmetoden för insert och köra koden överallt. Glöm inte att klicka på toggeln högst upp för att aktivera koden och klicka sedan på knappen ”Save”.

Edit insertion method for code

Om du behöver hjälp med att lägga till kod kan du följa vår Step-by-Step guide om hur du enkelt lägger till custom code i WordPress.

Den här koden hittar datumet för ditt första inlägg på din blogg och det senaste datumet du publicerade något. Sedan matar den ut ett dynamiskt Copyright Notice.

You will need to add the shortcode [copyright] to any post, page, or text widget on your site to display a copyright notice.

You can also use this code in your theme’s footer (du kan också använda den här koden i temats sidfot).

<?php echo wpb_copyright(); ?>

Om du nu inte är säker på om dina bilder har blivit stulna, så här kan du ta reda på det.

Hur man kontrollerar om ett foto är stulet

Det enklaste sättet att se om en bild är stulen är att använda Google Images. Det finns många andra premium tools, men Google är gratis och visar snabbt om någon annan använder dina images.

Du börjar med att besöka Googles website Imagely och sedan clicka på camera icon.

Google images search

Efter det kommer Google att ge dig 2 alternativ för att söka efter en image.

Du kan uploada din image eller klistra in bildens URL i Google Images.

Upload or paste image URL

Google kommer nu att visa details om imagen, möjliga related search och några visuellt liknande images.

Men om du rullar ner ser du sektionen ”Pages that include matching images”. Det är här du kan se alla websites som använder ditt foto utan ditt samtycke.

Pages that include matching images

När du har tagit reda på vem som har stulit dina images kan du kontakta dem och requesta dem att ge dig ett korrekt omnämnande av ditt arbete. You can also contact Google directly and submit a takedown notice.

Vi hoppas att den här artikeln hjälpte dig att skydda dina images och förhindra bildstöld i WordPress. Du kanske också vill se vår guide om hur du fixar de vanligaste image-problemen i WordPress och våra expertval för de bästa gratis WordPress-fotograferingstemana.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Avslöjande: Vårt innehåll stöds av våra läsare. Det innebär att om du klickar på några av våra länkar, kan vi tjäna en provision. Se hur WPBeginner finansieras, varför det är viktigt, och hur du kan stödja oss. Här är vår editoriala process.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Den ultimata WordPress-verktygslådan

Få GRATIS tillgång till vår verktygslåda - en samling WordPress-relaterade produkter och resurser som varje professionell användare bör ha!

Reader Interactions

46 kommentarerLämna ett svar

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Dennis Muthomi says

    Point #3 is something that I was not aware of, now I am putting it into consideration. Thank you WPBeginner for this guide.

  3. Chris Osaze Eriamatoe says

    Previewing your image on Google chrome also gives it an option to download the image to your local drive.

    • WPBeginner Support says

      If Google does index your image then there is not much you would be able to do for what Google shows but there is no way to completely prevent image theft.

      Administratör

    • Jiří Vaněk says

      Basically, if someone wants to steal the image, they can just take a screenshot on the web and get it that way. They can make their own copy using this function. Therefore, the best method is probably a watermark. Although it disfigures the image, it is the most difficult method for thieves. They would have to use some Photoshop or AI afterwards. And nobody is going to do that. It’s all about the effort of the image thief. The more complicated it is for the thief, the greater the chance they will give up and move on.

  4. Jiří Vaněk says

    Thank you for the article. Since I’ve found from backlinks that many sources are linking to my website and images, which could potentially burden the server over time, I’m considering watermarking to at least display the original URL on the destination. This, in my opinion, is one of the best ways to protect copyrights because many people might not bother stealing images and then removing watermarks using external programs.

  5. knotty says

    #disable hotlinking of images with forbidden or custom image option
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?wpbeginner.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]
    this code not working

    • WPBeginner Support says

      You would need to change wpbeginner.com to your domain name for the code to work properly.

      Administratör

  6. todd says

    Another method of image theft I’ve seen is when someone takes a screenshot and then crops the image to their liking.

    Thanks much for your work on this issue

  7. Aaron says

    Stopping the ”right click” only stops people that don’t know what they are doing, anyone scraping images will be still able to pull images.
    to test this open your browser, press ’F12’ then load any site, in the Network tab you will see all the images and content that your browser has downloaded to display the page, you can just save anything you like from there.

    • WPBeginner Support says

      You are correct and we do state in the article that there is no way to completely stop people from stealing your images, but these are options for those trying to add some level of prevention.

      Administratör

  8. crystal says

    Hi, if someone were to put it in the browser, is there a way to keep the wp-content/uploads URL from displaying a listing of all your photos, mp3’s, ect?

    Thanks!

  9. Usman says

    Somehow, even after following everything and editing the .htaccess file, the images can still be hotlinked :s don’t know why

  10. Helios Wislan says

    I love WP Beginner a lot! can’t say how many times it helps me, thanky you team for your fantastic and funtastic job for us.

  11. KarthikP says

    Thanks a lot .Even the code supplied on inmotion hosting was wrong.They redirected me to this page.Thanks a lot wpbeginner

  12. yashwanth says

    Hi I would like to how to actibate the same in the mobile version of the site. I am able to disble rightclick on the pc site view but am able to download it on mobile

  13. Matus says

    Many big companies (like Apple or even you WPBeginner) don’t use image hotlink protection.
    Is this method bad for SEO?

    Also you allowed in your .htaccess code only google.com but Google have websites with many extensions, how can I include them all?

  14. Sagar Patil says

    Hello.
    i wont my images crawl by search engine. but not hotlink by other website.
    if i disable hotlinking using htaccces. then does search engine will crawl my images or not?

  15. Erez says

    Overall, good article.
    You can still go to restricted images by using the direct URL:

    example.com/wp-content/uploads/2017/01/ImageName.jpg

    Any thoughts how it can be restricted?

  16. Bobby says

    If I am not mistaken, someone can just just save any given page and there you go …. all images from that respective page will be downloaded into a folder from the browser function.

    Any thoughts?

  17. Juliette says

    Hi and thanks for a great article!

    I have a question about the rewrite rule:

    !^http(s)?://(www\.)?wpbeginner.com [NC]

    For the line above, can I point to one base path if I am currently working in MAMP/localhost and plan on switching to a live server later?

    Thanks!

  18. Carol Henrichs says

    Still looking for a way to prevent access to the uploads area. When turning of lightbox in Envira, clicking on the image takes you directly to the image file and there is no protection.

  19. Stef says

    Thanks for the article. I’ve installed the ”no right click” which is fine when people are on laptops/desktops, but it doesn’t seem to stop people from holding down on a photo on their smartphone and ”saving image”….

    Any thoughts? Or tips?

  20. Catherine says

    Thanks for the tips.
    Is there a way to select the copyright author? Some pic are from me, others from stock. I use to give the credit at the end of the post, but don’t like it because it’s a kind of stop from reading related articles, or commenting.
    I would love to have a tool who will sett the copyright into the pic. Not like a watermark, but as a text addition.
    Is there something like that available?

    PS: which plugin is that ”Add your comment + notify me of… also subscribe without commenting”

  21. Pete says

    I am correct in assuming the same methods apply to video as well? I have a lot of video on my site and it is branded, but I would be more concerned about the ’theft’ of my bandwidth slowing my site down.
    I’m happy to have my content shared actually, but I don’t want that to result in a slow site when video is so demanding to start with.
    Thanks!

  22. Olli says

    You forgot something: dontate your pictures to the public by using a CC licence.
    It won’t hurt anyone and you don’t have to worry about something called ”theft” (some my say ”copying”).

  23. FraNK UMEADI says

    I have always being a victim of No 3 (Image hot linking). Recently a lot of tech bloggers started copying my posts at with the images being loaded from my server. This has caused slow loading and increased my used bandwith.

    Thanks so much for this guide! I will be implementing no 3 immediately.

Lämna ett svar

Tack för att du väljer att lämna en kommentar. Tänk på att alla kommentarer modereras enligt våra policy för kommentarer, och din e-postadress kommer INTE att publiceras. Vänligen använd INTE nyckelord i namnfältet. Låt oss ha en personlig och meningsfull konversation.