Title: Preload Images
Author: Ravikumar Patel
Published: <strong>7 junho, 2019</strong>
Last modified: 6 novembro, 2026

---

Pesquisar plugins

![](https://ps.w.org/preload-images/assets/icon-256x256.png?rev=2102220)

# Preload Images

 Por [Ravikumar Patel](https://profiles.wordpress.org/ravipatel/)

[Baixar](https://downloads.wordpress.org/plugin/preload-images.1.3.0.zip)

 * [Detalhes](https://br.wordpress.org/plugins/preload-images/#description)
 * [Avaliações](https://br.wordpress.org/plugins/preload-images/#reviews)
 *  [Instalação](https://br.wordpress.org/plugins/preload-images/#installation)
 * [Desenvolvimento](https://br.wordpress.org/plugins/preload-images/#developers)

 [Suporte](https://wordpress.org/support/plugin/preload-images/)

## Descrição

Preload Images loads the images you choose before the visitor needs them. It works
well for photo galleries, sliders, hover images and other image-heavy pages where
you want images to appear instantly.

**Features**

 * Add any number of image URLs that load on every page.
 * Add image URLs for a single page, post or custom post type from the editor.
 * Block editor (Gutenberg) support: a “Preload Images” panel in the post sidebar,
   with an “Add from Media Library” button.
 * Choose how images are loaded:
    - **Background (JavaScript)** loads images after the page has finished loading.
      This is the default and does not slow down the first render.
    - **Preload** adds `<link rel="preload" as="image">` to the page head. Use it
      only for a few important above-the-fold images, such as a hero image.
    - **Prefetch** adds `<link rel="prefetch">` so the browser caches images at 
      low priority for the next pages a visitor opens.
 * Lightweight: no external requests and no extra script files on the front end.
 * Developers can change the list with the `preload_images_urls` filter.

## Capturas de tela

[⌊Settings page: choose the loading method, add image URLs for every page and pick
the post types that get per-page images.⌉⌊Settings page: choose the loading method,
add image URLs for every page and pick the post types that get per-page images.⌉[

Settings page: choose the loading method, add image URLs for every page and pick
the post types that get per-page images.

[⌊Block editor (Gutenberg): the "Preload Images" panel in the page sidebar.⌉⌊Block
editor (Gutenberg): the "Preload Images" panel in the page sidebar.⌉[

Block editor (Gutenberg): the “Preload Images” panel in the page sidebar.

[⌊Pick images straight from the Media Library with "Add from Media Library".⌉⌊Pick
images straight from the Media Library with "Add from Media Library".⌉[

Pick images straight from the Media Library with “Add from Media Library”.

[⌊Classic editor: the "Preload Images" box below the content.⌉⌊Classic editor: the"
Preload Images" box below the content.⌉[

Classic editor: the “Preload Images” box below the content.

## Instalação

 1. In your dashboard, go to Plugins > Add New.
 2. Search for “Preload Images”.
 3. Click “Install Now”, then “Activate”.
 4. Go to the **Preload Images** menu, add your image URLs (one per line) and choose
    a loading method.
 5. To set images for single pages, tick the post types under “Post Types”. A “Preload
    Images” box then appears in the editor.

## Perguntas frequentes

### Which loading method should I use?

Use Background (JavaScript) for most images. Use Preload only for one or two images
that appear at the top of the page. Preloading many images makes the page slower.
Use Prefetch for images that are shown on the next pages a visitor is likely to 
open.

### Does it work with the block editor?

Yes. In the block editor, a “Preload Images” panel appears in the post sidebar, 
where you can type URLs or pick images from the Media Library. The classic editor
shows a “Preload Images” box below the content.

The sidebar panel is used for post types that support custom fields (posts and pages
by default). Other custom post types show the box below the content in both editors.

### Can I change the URLs from code?

Yes:

    ```
    add_filter( 'preload_images_urls', function ( $urls, $post_id ) { $urls[] = 'https://example.com/image.jpg'; return $urls; }, 10, 2 );
    ```

## Avaliações

![](https://secure.gravatar.com/avatar/1d95946f7c8e66265445d0e55209833acbcb6baf0e624c347e9805f41062b01c?
s=60&d=retro&r=g)

### 󠀁[Perfect to improve animated GIF trigger on mobile](https://wordpress.org/support/topic/perfect-to-improve-animated-gif-trigger-on-mobile/)󠁿

 [photoMaldives](https://profiles.wordpress.org/photomaldives/) 20 setembro, 2022

I wanted to trigger an animated GIF on hover. To implement this, I followed a simple
online guide to *swap* an image on hover – set initial image as the first frame 
of your GIF, and the second image as the animated GIF itself. This worked perfectly
on desktop, but there was a small but very annoying flash on mobile (on touch). 
Enter this plugin! I enabled the plugin for pages (setting), then copy/pasted the
URL of my GIFs in the 'Image URLs' field on my specific page … and voila! The flash
is history! Thanks to the plugin author – Ravikumar Patel (@ravipatel) – for such
a simple and neat solution for my unique case. 5/5 ⭐⭐⭐⭐⭐ PS: it took me longer
to write a Support question followed by this review, than it did to actually apply
the fix! 🙂

![](https://secure.gravatar.com/avatar/24f7ca8f621ae28f8361cc995e081d65f3567baf36b487b58f13d4c47f80dec1?
s=60&d=retro&r=g)

### 󠀁[Highly recommended!](https://wordpress.org/support/topic/highly-recommended-573/)󠁿

 [Joey](https://profiles.wordpress.org/joey4j/) 16 agosto, 2022

I run a photo gallery website for hobby using fancybox, and I'm happy to find this
plugin! Initially I was searching for a solution with JavaScript, etc., but this
is much easier way to preload images with relatively large file sizes. Thank you
for the developers behind this!

![](https://secure.gravatar.com/avatar/515535dd50b9575566f1e0878f29f67209d556ff2e5a2b399289ebde7fa34017?
s=60&d=retro&r=g)

### 󠀁[Doesn’t work to preload site background image +](https://wordpress.org/support/topic/doesnt-work-to-preload-site-background-image/)󠁿

 [wardencenter](https://profiles.wordpress.org/wardencenter/) 9 janeiro, 2022

Sadly, the plugin does not work to preload a site's background image when that image
is specified in common image urls. Plus, when there is no image specified in the
common image urls, the site loads as a blank page with what I can only describe 
as a spinning waiting icon. Once the spin is done the site does load smoothly with
the background image. But, who wants clients seeing a site that loads with a spinning
icon for 3 seconds? Hopefully they'll update so that the background image can be
specified in the common image urls, because it does seem an easy to use plugin.

![](https://secure.gravatar.com/avatar/9f8f099065ceffe62bc40ed22f624d99fcc084ef2b9dc9b656923fe2f0899a11?
s=60&d=retro&r=g)

### 󠀁[Does an excellent job](https://wordpress.org/support/topic/does-an-excellent-job-11/)󠁿

 [Topher](https://profiles.wordpress.org/topher1kenobe/) 12 dezembro, 2021 1 resposta

I found myself needing to pre-load some images and started to figure out how to 
do it by hand when I thought "If you have a need in WordPress, there's probably 
a plugin for it." So I went hunting and found this plugin. Gutenberg made it a little
hard to see the meta box on Pages at first, but I found it. I REALLY like that you
can preload per page/post, or have them global. Nicely done.

![](https://secure.gravatar.com/avatar/a18b1df4849cbfd66bdfb5a3f2829964b3878b93bcb2960607511437e9518123?
s=60&d=retro&r=g)

### 󠀁[This plugin is awesome!](https://wordpress.org/support/topic/this-plugin-is-awesome-95/)󠁿

 [rafaelbrasileirinho](https://profiles.wordpress.org/rafaelbrasileirinho/) 15 outubro,
2021 1 resposta

The plugin fix divi image loading error and glitches, and give for your website 
a speed boost helping in Google SEO.

![](https://secure.gravatar.com/avatar/f0197012ce2fe56090698d2f5ce040affb3c9d30f56bf4708ec3b79f6f0f2105?
s=60&d=retro&r=g)

### 󠀁[Works Like a Charm](https://wordpress.org/support/topic/works-like-a-charm-1960/)󠁿

 [webdesignerz](https://profiles.wordpress.org/webdesignerz/) 17 julho, 2021

I am very thankful for this plugin, and of course the person/s who created it. My
client wanted an image carousel as the homepage header, which resulted in short 
loading delays the first run through. Since using this plugin — no delays! Pretty
cool stuff.

 [ Leia todas as 8 avaliações ](https://wordpress.org/support/plugin/preload-images/reviews/)

## Colaboradores e desenvolvedores

“Preload Images” é um programa de código aberto. As seguintes pessoas contribuíram
para este plugin.

Colaboradores

 *   [ Ravikumar Patel ](https://profiles.wordpress.org/ravipatel/)
 *   [ webbymonks ](https://profiles.wordpress.org/webbymonks/)

Preload Images” foi traduzido para 1 localidade. Agradecemos aos [tradutores](https://translate.wordpress.org/projects/wp-plugins/preload-images/contributors)
por suas contribuições.

[Traduzir o “Preload Images” para seu idioma.](https://translate.wordpress.org/projects/wp-plugins/preload-images)

### Interessado no desenvolvimento?

[Navegue pelo código](https://plugins.trac.wordpress.org/browser/preload-images/),
consulte o [repositório SVN](https://plugins.svn.wordpress.org/preload-images/) 
ou assine o [registro de desenvolvimento](https://plugins.trac.wordpress.org/log/preload-images/)
por [RSS](https://plugins.trac.wordpress.org/log/preload-images/?limit=100&mode=stop_on_copy&format=rss).

## Registro de alterações

#### 1.3.0

 * New: block editor (Gutenberg) sidebar panel with Media Library picker.
 * New: choose a loading method: background JavaScript, `<link rel="preload">` or`
   <link rel="prefetch">`.
 * New: `preload_images_urls` filter.
 * New: plugin data is removed when the plugin is deleted.
 * New: updated screenshots.
 * Fix: the “Settings” link on the Plugins screen pointed to the wrong page.
 * Fix: URLs containing `&` were double-encoded and could break. Existing saved 
   URLs are cleaned up automatically on upgrade.
 * Fix: per-page images were not used on some archive pages.
 * Fix: per-page images of password-protected posts are no longer shown before the
   password is entered.
 * Improved: security hardening, escaping and coding standards.
 * Improved: the background script no longer adds global JavaScript variables and
   runs after the page has loaded.
 * Tested with WordPress 7.1. Requires WordPress 6.1 and PHP 7.4.

#### 1.2.1

 * Bug fixes

#### 1.2

 * Now you can manage images for single pages and post types.
 * PHP code changes.
 * Tested with WordPress 5.6.

#### 1.1

 * Minor code changes.
 * Tested with WordPress 5.5.1.

#### 1.0

 * Initial release.

## Meta

 *  Versão **1.3.0**
 *  Última atualização **1 semana atrás**
 *  Instalações ativas **900+**
 *  Versão do WordPress ** 6.1 ou superior **
 *  Testado até **7.1.4**
 *  Versão do PHP ** 7.4 ou superior **
 *  Idiomas
 * [English (US)](https://wordpress.org/plugins/preload-images/) e [Gujarati](https://gu.wordpress.org/plugins/preload-images/).
 *  [Traduzir para seu idioma](https://translate.wordpress.org/projects/wp-plugins/preload-images)
 * Tags
 * [images](https://br.wordpress.org/plugins/tags/images/)[performance](https://br.wordpress.org/plugins/tags/performance/)
   [prefetch](https://br.wordpress.org/plugins/tags/prefetch/)[preload](https://br.wordpress.org/plugins/tags/preload/)
   [speed](https://br.wordpress.org/plugins/tags/speed/)
 *  [Visualização avançada](https://br.wordpress.org/plugins/preload-images/advanced/)

## Classificações

 4.6 de 5 estrelas.

 *  [  7 avaliações com 5 estrelas     ](https://wordpress.org/support/plugin/preload-images/reviews/?filter=5)
 *  [  0 avaliação com 4 estrela     ](https://wordpress.org/support/plugin/preload-images/reviews/?filter=4)
 *  [  0 avaliação com 3 estrela     ](https://wordpress.org/support/plugin/preload-images/reviews/?filter=3)
 *  [  1 avaliação com 2 estrela     ](https://wordpress.org/support/plugin/preload-images/reviews/?filter=2)
 *  [  0 avaliação com 1 estrela     ](https://wordpress.org/support/plugin/preload-images/reviews/?filter=1)

[Sua avaliação](https://wordpress.org/support/plugin/preload-images/reviews/#new-post)

[Ver todas avaliações](https://wordpress.org/support/plugin/preload-images/reviews/)

## Colaboradores

 *   [ Ravikumar Patel ](https://profiles.wordpress.org/ravipatel/)
 *   [ webbymonks ](https://profiles.wordpress.org/webbymonks/)

## Suporte

Tem algo a dizer? Precisa de ajuda?

 [Ver fórum de suporte](https://wordpress.org/support/plugin/preload-images/)

## Doar

Gostaria de contribuir para o desenvolvimento deste plugin?

 [ Doe para este plugin ](https://paypal.me/rvpatel)