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

Hur man tillåter användare att uppladare images i WordPress Comments

Vill du allow användare att attachment bilder och filer i WordPress kommentarer?

Images och comments är båda kraftfulla tools för att öka engagemanget hos användarna på din site i WordPress. Beroende på din webbplats nisch och målgrupp kan det öka användarnas engagement på din site avsevärt om du tillåter visitorerna att uppladdare images i comments.

I den här artikeln kommer vi att visa dig hur du tillåter användare att uploada images i WordPress comments.

Allow users to upload images in WordPress comments

Varför allow users to upload images in WordPress Comments?

WordPress comments är ett bra sätt att kommunicera med dina besökare. Folk lämnar återkoppling, ställer frågor och ger rekommendationer som kan vara användbara för att bygga ditt varumärke och förbättra produkter.

Att allow användare att uploada images i comments kan ytterligare förbättra användarupplevelsen. Besökare kan till exempel dela screenshots av sina problem i kommentarerna, vilket ger ditt support team mer information för att lösa deras problem.

På samma sätt kan det hjälpa till att starta engagerande diskussioner där människor kan dela roliga bilder och memes. Detta kommer att bidra till att göra your comments visuellt tilltalande och roligare att läsa.

Eller om du runar en blogg om resor kan det hjälpa till att samla in användargenererat content om du allow images i comments. Användare kan till exempel dela med sig av bilder från sina favoritdestinationer, platser de besökt och mycket mer.

Med detta sagt, låt oss se hur man allow image uploads i WordPress comments.

Video Tutorial

Subscribe to WPBeginner

Om du föredrar skriftliga instruktioner är det bara att fortsätta läsa.

Allow Users to Upload Images in WordPress Comments (Tillåt användare att uppladare Images i WordPress kommentarer)

Det första du behöver göra är att installera och aktivera DCO Comment Attachment plugin. För mer detaljer, se vår Step-by-Step guide om hur du installerar ett plugin för WordPress.

Vid aktivering kommer pluginet att fungera ur boxen och lägga till ett alternativ för filuppladdning i WordPress comments area.

Du kan edit dess inställningar genom att gå till Settings ” DCO Comment Attachment från din WordPress dashboard.

Change DCO comment attachment settings

Pluginet låter dig ställa in en maximal upload-filstorlek, göra det till ett krav att bifoga filer, embed bilagor, välja en bifogad image-storlek och mer.

You can also allow your users to attach different file types, like a document, PDF, PowerPoint presentation, excel spreadsheet, and more by checking the file type option.

Det finns också ett alternativ att select all användare eller bara allow logged in users to upload attachments in WordPress comments.

Choose file types to upload

När du har gjort ändringarna, glöm inte att clicka på knappen ”Save Changes”.

Efter det, head över till någon post page på din WordPress blogg, och du kommer att se en image uppladdningsfält i kommentarerna området gillar skärmdumpen under:

Upload image attachment preview

Alla images som uppladdats av användare lagras i ditt mediabibliotek i WordPress. Om du vill ta bort en image som har laddats upp av en användare måste du gå till Media ” Bibliotek, lokalisera imagen och sedan ta bort den.

Detta kommer att borttaga image från comment utan att påverka kommentartexten.

För att undvika missbruk av den här funktionen rekommenderar vi att du lägger till några riktlinjer för kommentarer på din site för att låta användarna veta vilken typ av attachments de kan uploada. Du kan kontrollera WPBeginners sida för kommentarpolicy för ett exempel.

You can then add a link to your comment policy text in the WordPress comment form.

På grund av images karaktär kanske du vill granska all comments innan de visas på din site. Du kan göra detta genom att aktivera moderation av kommentarer och meddela användare när deras kommentar har godkänts på din site.

För att ytterligare öka media capabilities i dina comments kan du aktivera oEmbed support för comments i WordPress. Detta kommer att tillåta dina användare att embedda YouTube-videor, tweets, Flickr-bilder och mer tillsammans med de images de uploadar.

Vi hoppas att den här artikeln hjälpte dig att lära dig hur du tillåter användare att uploada images i WordPress comments. Du kanske också vill se våra tips om hur du får fler comments på dina blogginlägg i WordPress, och hur du startar en online store.

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

34 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. Mike Avery says

    There seems to be a new comment attachment plugin called, ”DCO Comment Attachment”,

    Have you tried it yet? Can you recommend it?

    • WPBeginner Support says

      Not at the moment but once we find something we will certainly update the article :)

      Administratör

    • WPBeginner Support says

      Apologies, the plugin we are currently recommending is no longer available. We will be sure to update the article with an alternative when we are able, after which we would be able to look into conditional loading.

      Administratör

    • WPBeginner Support says

      Thanks for letting us know about that, we’ll be sure to look for an alternative

      Administratör

  3. Jane Beinart says

    Is it possible to post photos this way via your mobile phone? I’m finding that posting photos via the computer is fine, but via iphone just gets an error message and says it is the wrong format of image. Any ideas as to how to make this work?

    • WPBeginner Support says

      It would depend on the file type of image that is being sent. If it is one of your allowed file types you would want to reach out to the support for the plugin to let them know and they should be able to assist.

      Administratör

  4. Rachael says

    Is there anyway to filter the most top liked pictures to the top of the page?? Also is there a way for other users to reply to the comment? This worked but isn’t functioning the way I would like it to….

    • WPBeginner Support says

      It should allow people to reply the same way they would reply to a normal content but for what you’re asking for may require a custom plugin.

      Administratör

  5. omer noiman says

    Hey, I did everything as described.
    when i am trying to test this, and upload an image, it redirects me to page 404

    The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. Please try another search …

      • Heidi says

        Hi, I am also having a page not found issue when trying to test this out by posting a comment with an image. The plugin support seems MIA. I did try what you suggested about the permalinks and I still can’t get my image to post. Any ideas? Thanks.

  6. Michael Vivar says

    Quick question. If I have an existing comment widget and I install ”Comment Attachment”, will existing comments be affected?

  7. Chaz DeSimone says

    Fantastic plugin for uploading photos with recipes submitted by readers…until we install a ”real” recipes plugin. Thank you!

  8. Rod Fleming says

    If it’s a hosted site and you are Admin, just click on the img button and enter the URL of the image. For a local image, first upload to the Media Library and copy the URL. Paste that into the img dialogue box in the comment section and add an alt tag when prompted. No Plug-in required.

    I can’t remember how long this has been available in WP but it’s a long time; I’ve been a user for nearly 10 years and it’s always been like this.

  9. Manasa says

    The wordpress website/s that I post comments to do not have the Upload Image option even though I know that users have posted images and so has the author/writer. But I do not know how else to upload an image without that option while posting comments.

  10. Traruh Synred says

    On a blog I post too I can’t load images. Others commenters do load images. They in could a link to the image.

    This doesn’t work for me. Yet the blog does allow images.

    I’ve tried various links in both email response and using WordPress reply. Niether works.. If I embed an image in an email it gets stripped out.

    I assume I’m doing something wrong, but can’t figure out what?

    E.g.,

  11. Amber says

    In Facebook, when you add a URL, it automatically sources the image for you. Is there a way to do that in WordPress comments?

  12. M.Khurram says

    On installation process this is happening
    Unable to create directory wp-content/uploads/2015/03. Is its parent directory writable by the server?

  13. Pamela says

    nice to be able to upload but the images are huge… they don’t retain their original size why??? can this be rectified so images stay in their original size??

  14. Marcus says

    While this is certainly a great way to boost user engagement, on some hosting platform this can pose a serious security issue. It is surprisingly simple to disguise a php script as a gif image. I strongly suggest using plugins like these only in combination with some .htaccess magic preventing scripts from being executed within your uploads folder. Especially on shared hosting platforms.

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.