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

Dove WordPress memorizza le immagini sul vostro sito?

Nota editoriale: guadagniamo una commissione dai link dei partner su WPBeginner. Le commissioni non influenzano le opinioni o le valutazioni dei nostri redattori. Per saperne di più su Processo editoriale.

Vi state chiedendo dove WordPress memorizza le immagini sul vostro sito web?

Molti principianti di WordPress ci hanno chiesto come WordPress memorizza le immagini e cosa possono fare per organizzare la libreria dei media in modo più efficiente.

In questo articolo spiegheremo come WordPress archivia le immagini sul vostro sito web. Condivideremo anche gli strumenti e i plugin che potete utilizzare per organizzare facilmente le immagini in modo più efficiente.

Where does WordPress store image files (Explained)

Come fa WordPress a memorizzare le immagini?

WordPress ha un sistema integrato per gestire i caricamenti di media come immagini, video, audio e documenti sul vostro sito web.

Questo sistema consente di caricare facilmente immagini e altri media in una cartella specifica del vostro server di hosting WordPress.

Questi file vengono quindi visualizzati nella libreria dei media, che si può visualizzare visitando la pagina Media ” Libreria.

WordPress media library

Da qui è possibile modificare questi file, manipolarli o addirittura eliminarli.

La cartella specifica in cui sono memorizzati i file immagine in WordPress si chiama cartella uploads, situata all’interno della cartella /wp-content/.

Uploads folder in WordPress

All’interno di questa cartella, i file multimediali sono archiviati nelle cartelle dell’anno e del mese. Inoltre, sono presenti cartelle create dai plugin di WordPress per salvare altri caricamenti.

Ad esempio, tutti i file multimediali caricati nel giugno 2022 saranno archiviati in:

/wp-content/uploads/2022/06/

Potete visualizzare questi file e cartelle collegandovi al vostro account di hosting WordPress con un client FTP o tramite l’applicazione File Manager nel pannello di controllo del vostro account di hosting.

Media uploads organized in year and monthly folders

Si noterà che ci sono diverse copie di ogni immagine caricata sul server.

Queste dimensioni sono generate automaticamente da WordPress quando si carica un’immagine.

Multiple image sizes

Per impostazione predefinita, è possibile visualizzare una miniatura, una dimensione media e una grande dell’immagine insieme al caricamento originale.

Inoltre, il tema o i plugin di WordPress possono generare immagini di dimensioni aggiuntive da utilizzare.

Ora, vi starete chiedendo come WordPress visualizza le informazioni su questi file all’interno della libreria dei media.

A tal fine, WordPress memorizza anche le informazioni relative alle cariche di immagini nel database come post type di contenuto nella tabella dei post.

Oltre a questo, WordPress salva anche le informazioni nella tabella dei meta-post quando si inseriscono immagini nei post/pagine o in qualsiasi altro tipo di post personalizzato.

Meta data for images stored in WordPress database

Ad esempio, quando si imposta un’immagine in primo piano, WordPress salva questa informazione come meta-chiave _thumbnail_id.

Quindi lo memorizza nella tabella post meta del database.

Image meta data stored in WordPress database

Le informazioni contenute nel database indicano a WordPress la posizione del file sul server di hosting.

Ora, se si elimina un file dal server tramite FTP, WordPress mostrerà le immagini come non funzionanti.

Broken image in WordPress

Allo stesso modo, se si elimina il riferimento a un’immagine dal database di WordPress, il file rimarrà intatto sul server di hosting, ma non apparirà nella libreria multimediale.

Modifica del modo in cui WordPress memorizza le immagini e i caricamenti multimediali

Di default, WordPress non consente di modificare il percorso di uploader dall’area di amministrazione di WordPress.

L’unica modifica che si può fare è disabilitare le cartelle basate sul mese e sull’anno visitando la pagina Impostazioni ” Media dalla dashboard di WordPress.

Media settings in WordPress

Da qui è possibile anche regolare le dimensioni massime in pixel per il caricamento delle immagini.

Gli utenti avanzati di WordPress possono seguire il nostro tutorial su come modificare manualmente la cartella uploads predefinita di WordPress per maggiori dettagli.

Organizzare le immagini in WordPress

Per la maggior parte degli utenti, la libreria multimediale predefinita di WordPress va benissimo.

Tuttavia, se le immagini hanno un ruolo più significativo nel vostro blog WordPress, potreste aver bisogno di strumenti aggiuntivi per organizzare i vostri caricamenti.

Ad esempio, se gestite un sito web di fotografia, potreste voler organizzare i vostri contenuti in album o tag.

A tal fine, è necessario un plugin come Envira Gallery. È il miglior plugin per gallerie di immagini per WordPress sul mercato, che consente di organizzare le immagini in album, tag e gallerie.

Envira Gallery provides albums and tags functionality for images

Consentire agli utenti di caricare immagini in WordPress

Per impostazione predefinita, WordPress consente a tutti gli utenti che possono scrivere post sul vostro sito web di caricare immagini. Questo include gli utenti con i ruoli di Amministratore, Autore, Editor e Collaboratore.

Ma se voleste che altri utenti caricassero immagini sul vostro sito web senza accedere all’area di amministrazione?

Per farlo, avrete bisogno del plugin WPForms. È il miglior plugin per moduli di contatto di WordPress che vi permette di creare facilmente qualsiasi tipo di modulo per il vostro sito web.

È inoltre dotato di un campo di caricamento file che consente agli utenti di caricare facilmente immagini, documenti e altri file senza creare un account utente o accedere all’area di amministrazione di WordPress.

Per prima cosa, è necessario installare e attivare il plugin WPForms. Per maggiori dettagli, consultate la nostra guida passo passo su come installare un plugin di WordPress.

Dopo l’attivazione, visitate la pagina WPForms ” Impostazioni per inserire la vostra chiave di licenza. Potete trovare queste informazioni nel vostro account sul sito web di WPForms.

Entering your WPForms license key

Successivamente, si deve andare alla pagina WPForms ” Aggiungi nuovo per creare il modulo per l’uploader delle immagini.

Per prima cosa, occorre dare un titolo al modulo. Dopodiché, si può cercare il modello di modulo di caricamento dei file per iniziare.

File upload form

WPForms caricherà ora l’interfaccia del builder del modulo, dove si vedrà l’anteprima del modulo sulla destra e i campi del modulo nella colonna di sinistra.

Questo modello di modulo include per impostazione predefinita un campo per il caricamento dei file. È possibile aggiungere o rimuovere campi al modulo, modificarne le etichette o spostarli in alto o in basso.

File upload form editing

È possibile fare clic sul campo Caricamento file per modificarne le impostazioni. Da qui è possibile impostare i tipi di file e il numero di file che un utente può caricare. È inoltre possibile impostare un limite massimo di dimensioni dei file.

Per istruzioni dettagliate, potete consultare il nostro tutorial su come creare un modulo di caricamento file in WordPress.

File upload settings

Una volta terminato, è possibile salvare il modulo e uscire dal costruttore di moduli.

Successivamente, è necessario creare un nuovo post o pagina o modificarne uno esistente. Nella schermata di modifica del post, aggiungete il blocco WPForms all’area dei contenuti.

Add form to your WordPress website

Quindi, fare clic sul menu a discesa all’interno del blocco WPForms per selezionare il modulo creato in precedenza.

Ora è possibile salvare le modifiche e visualizzare l’anteprima del post o della pagina per vedere il modulo di caricamento dei file in azione.

File upload form

È quindi possibile visualizzare tutti i file caricati dagli utenti visitando la pagina WPForms ” Inserimenti dalla dashboard di WordPress.

Fare clic sul modulo di caricamento dei file per visualizzare una voce e vedere i file caricati.

User entry

Per maggiori dettagli, consultate la nostra guida completa su come consentire agli utenti di caricare immagini in WordPress.

Bonus: Ottimizzazione delle immagini di WordPress per le prestazioni

Le immagini sono molto coinvolgenti e rendono i contenuti più interessanti per gli utenti. Tuttavia, richiedono anche più tempo per essere caricate rispetto al semplice testo.

Ciò significa che se in una pagina sono presenti più immagini di grandi dimensioni, il caricamento della pagina web sarà più lento. La lentezza della pagina influisce sull’esperienza dell’utente e sulla SEO.

Fortunatamente, esistono moltissimi strumenti per ottimizzare facilmente le immagini per il web prima di caricarle su WordPress.

Ad esempio, è possibile utilizzare un plugin per la compressione delle immagini di WordPress come EWWW Image Optimizer per ottimizzare automaticamente ogni immagine caricata sul sito web.

EWWW Image Optimizer

È possibile aumentare ulteriormente le prestazioni utilizzando una CDN (content delivery network). Ciò consente di caricare le immagini da una rete globale di server anziché dal vostro server di hosting.

Consigliamo di utilizzare Bunny.net, il miglior servizio CDN presente sul mercato. È facilissimo e viene fornito con il proprio plugin per WordPress per una configurazione più rapida.

Speriamo che questo articolo vi abbia aiutato a capire dove WordPress memorizza le immagini sul vostro sito. Potreste anche consultare la nostra guida su come trovare immagini royalty-free per il vostro blog WordPress o la nostra guida per principianti su come funziona WordPress dietro le quinte.

Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.

Divulgazione: I nostri contenuti sono sostenuti dai lettori. Ciò significa che se cliccate su alcuni dei nostri link, potremmo guadagnare una commissione. Vedi come WPBeginner è finanziato , perché è importante e come puoi sostenerci. Ecco il nostro processo editoriale .

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.

Il kit di strumenti WordPress definitivo

Ottenete l'accesso gratuito al nostro kit di strumenti - una raccolta di prodotti e risorse relative a WordPress che ogni professionista dovrebbe avere!

Reader Interactions

37 commentiLascia una risposta

  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. Jiří Vaněk says

    By default, WordPress media is stored in the wp-content/upload folder. Is it possible to change it to another folder in the configuration?

  3. Moinuddin Waheed says

    While we upload any image it gets uploaded inside the media gallery of the wordpress.
    while it gets into different months folders by default it becomes handy to organise and access them but at times it becomes hard to find a particular image if not informed of the month of upload.
    Does images of all kinds whether posts or pages gets into monthly folder or only the posts or articles images go inside monthly folder?

    • WPBeginner Support says

      All of the images should be included in the folders but you should be able to search by title to find the image in your media library.

      Admin

  4. Omar Abrahim says

    Hi,

    The uploads folder is critical, correct? While there are probably references to the images / files stored in the WP database, the actual files in the uploads folder are needed, as they are not stored in the databse. Do I have that right?

  5. guy says

    hi
    i have about 100 images in my gallery.
    when i looked at the download images in the server, i sow almost 1000.
    same image 10 times.. with different resolution.
    why is that?
    how do wordpress store images?
    thanks

  6. Pratik Patel says

    Hello Admin,

    I have some issues in automated Generated URLs,

    I have some URLs that includes only individual images in body from the rest of the website URLs, and they are indexed in Google. I wanted to remove this type of URLs from the Google Index.

  7. Luis Garcia says

    Hi,

    I have been working in a website. It is a redesign of an already existing page, so what I did was: I exported all posts and pages through WP Exporter, but the images were missing. So, now the posts that had galleries don’t have the galleries, they don’t show up. Later, and as I was really advanced, I realized I should’ve exported and imported the database as well. Long story short, now I am trying to recover those images and make them appear in my current site. Is there a way to blend the last database with the new one?
    Thanks a lot.

  8. Lucy says

    Hi,
    Thanks a lot for your help!!!

    Is there a plugin which can help to remove all the images not actualy used in any posts or pages?

    Thank you.

  9. Nitish says

    Hello
    how to upload user images from custom template to custom folders and also in database table.

    Pls help
    Thanku.

  10. Adam says

    Hello – Are there other places that WP can store images? I’ve taken over a legacy site (a pretty new site) and an image i need to replace is not located in the media library but does not appear to be hosted outside the site.

    • John says

      Hi Adam, did you ever figure this out? I’m running into the same issue. I have a list of images that are too big in file size, so I am going through the site and reducing these to optimize our site upload time. I’m having no luck with finding ANY images that contain “/legacy” in the URL.

  11. Mahmoud Momani says

    Hello,
    Thanks for the article.
    I have a question about converting an ASP.NET website to wordpress, if you can write an article describing the required tables and how to insert data in it.
    Thanks.

  12. Holly says

    If I delete and image from my media library after posting it to my site will it delete the image off of my site as well?

  13. Ruth Billheimer says

    Am I right in thinking that having a lot of images in the media library doesn’t slow up the site? I’m trying to get my head round the way pages load, to try and get a better speed. So if you have a lot of images on a page, they will slow it up but it doesn’t matter how many images you have stored. Is that right?

  14. nilesh nolkha says

    I had one question regarding SEO of images. When you upload pics in media library, you can suggest a title, caption and alt text. Similarly when you are actually adding that media to the post pr image widget on page builder, you again can enter title, caption, alt image etc. Does it matter if we do it once or we have do it again for the media while adding it to a post ? How it is different

    • Ruth Billheimer says

      I think the caption can vary depending on where you’re using the image but the others stay the same. The alt text should be different from the title, or you can mark the image as decorative. If you have an accessibility plugin for people with a visual impairment, you also have to fill in the description.

  15. Sandy Ellingson says

    Is there a way to export a list of items in the media file with the associated links? I found this post while trying to answer this question. I have looked for the wp_post file via phpmyadmin and can’t find it. Perhaps this is an old post?

  16. Marc Connor says

    Do you guys recommend using your own image folder structure via FTP?

    I like to create a folder in the root called “images”, and store the images there. Well, as many as that particular WordPress t heme would let me.

    Is that better or worse than the default date-based structure?

    Sincerely,
    Marc

  17. Bob says

    I built a website on my churches server. So now when I’m building my personal site which is a different server. I see all of the media of my churches site with my personal. Oh I built them on my laptop.

  18. jabbo126 says

    It’s shame, that WordPress still haven’t better media files upload solution with better folder organization.

  19. Ikramullah says

    Hi,
    My attached one of images are not shown as image tag beside starting paragraph as a tag.
    How to enable this feature?

    I need this info.

    Thanks.

  20. vijay jangra says

    Hello editorial staff members, i have read and seen your many blog posts. I have a question in mind.
    How to build these beautiful images for your blog posts.

  21. kif says

    hello, can you tell us why wp crop images? even when i upload i single one?

    thank you for your daily edition emails!

    • Kevin says

      WP automatically creates thumbnails, and versions for various sizes (small, medium, large, etc) for use with various devices on responsive website. So generally you’ll have the original size + the various auto-created sizes. You can then pick the appropriate size when adding an image to a page/post and WP will then serve the correct version for the device being used.

Lascia una risposta

Grazie per aver scelto di lasciare un commento. Tenga presente che tutti i commenti sono moderati in base alle nostre politica dei commenti e il suo indirizzo e-mail NON sarà pubblicato. Si prega di NON utilizzare parole chiave nel campo del nome. Avremo una conversazione personale e significativa.