Snug Gallery / Guides

Import images into a Shopify gallery from a URL

How Snug Gallery imports public image URLs into Shopify Files, which URLs are refused and why, and what happens when a gallery runs out of room.

Photographers send a Dropbox link. The agency puts the campaign shots on a staging server. A supplier has product photos on their own CDN. In every case the images already exist somewhere on the web, and the slow way to get them into a Shopify gallery is to download them to a laptop, then upload them again. Snug Gallery's Image URLs source skips the laptop: paste the addresses, and Shopify fetches each one into your Files library. This guide explains exactly what happens when you do that, which addresses are refused and why, and what the app does if the gallery runs out of room half way through.

Where the option lives

Open a gallery in Snug Gallery and choose Add media. The page offers three sources: Shopify Files, for images already in your store's library; Product images, for photos attached to products; and Image URLs. The first two pick from things Shopify already stores. The third creates new files, which is why it behaves a little differently.

Under Image URLs there is one text box. Put one address per line. Spaces and line breaks both separate addresses, so pasting a column from a spreadsheet works, and so does pasting a sentence with several links in it. Duplicate lines are collapsed, so the same photo pasted twice is imported once.

What happens when you click Import

The app checks the gallery's room first. Every plan has a per-gallery image limit (25 on Free, 1,000 on Standard and Unlimited), and the page shows how many slots are left before you paste anything. If you paste more addresses than there are slots, nothing is fetched; the error tells you the limit and how many more images you can add, and you trim the list.

When there is room, the app asks Shopify to create a file for each address. Shopify's own servers download the image and store a copy in your Files library, the same place your theme images and uploaded product photos live. Snug Gallery does not download anything itself and does not host a copy anywhere. This matters for the long run: the gallery keeps working if the original host removes the picture, renames it or shuts down, because the storefront serves Shopify's copy, not the original link. The trade-offs of keeping gallery media in Shopify Files are covered in Shopify Files versus app-hosted images.

Once the files exist, they are added to the gallery in the order you pasted them and you are taken back to the gallery page. Captions and alt text start empty; the import does not guess them from the file name. Fill them in on the gallery page as you would for any other image.

Which addresses are refused

Not every link is accepted, and the refusals are deliberate. The address must start with https://. Plain http:// links are turned away, because Shopify fetches the file on your behalf and an unencrypted fetch can be tampered with between their server and the host. If a supplier only offers http, ask for the https version; most hosts have one.

The address must point at a public host with a normal name. Addresses with a user name and password embedded in them are refused, so are addresses with a custom port, bare IP addresses, and single-word hosts such as http://intranet. Names ending in .local, .localhost, .internal or .arpa are also refused. These rules exist so that the import cannot be used to reach servers inside somebody's private network; they cost nothing for the ordinary case of a photo on a CDN or a file host.

When one or more lines fail these checks, the whole import stops before anything is created. The error message starts with 'Only public https:// image URLs can be imported' and lists the first few offending addresses so you can find them in a long paste. Fix or remove those lines and click Import again. Lines that passed were not created on the first attempt, so there is nothing to clean up.

Links that pass the check but still fail

The address rules are about shape, not content. A well formed https link can still fail when Shopify tries to fetch it: the file is not an image, the page needs a login, the host blocks automated downloads, or the link is to an HTML page that merely shows the picture. Dropbox and Google Drive share links are the usual culprits. Both show a preview page rather than the file itself, and both have a direct-download form of the link; use that form. For Dropbox, change dl=0 to dl=1 at the end of the link. For other hosts, right-click the image in your browser and copy the image address rather than the page address.

You can tell the two kinds of failure apart by where they stop. A refused address stops the whole import before any file exists. A fetch failure reaches Shopify, and the file may appear in your Files library in a failed state, which you can delete from Content, then Files in the admin.

What happens if the gallery fills up during the import

The room check at the start covers the common case, but two people can edit the same gallery, and a customer photo can be approved between the check and the add. If adding the new files to the gallery fails because it is now full, Snug Gallery deletes the files it just created, so you are not left with orphaned images in your library. It only deletes files that came from that URL import. Images chosen from Shopify Files or from your products in the same session are never deleted by the app, because they were yours before the import started.

After a cleanup like that, the gallery is unchanged and the error explains why. Remove something, or upgrade the plan, then paste the addresses again.

When a URL import is the wrong tool

If the photos are already attached to your products, use the Product images source instead. It reuses the existing files rather than creating new ones, so nothing is duplicated in your library and the gallery image stays in step with the product photo. If the photos are already in Files, use the Shopify Files source for the same reason.

If the source is a folder on your computer, upload through Shopify's Content, then Files page and pick from the Shopify Files source afterwards. It takes one extra step but gives you Shopify's upload progress and error handling, which is better than anything a text box of links can offer.

A URL import earns its place when the images live on someone else's server and you have been sent a list of addresses. Paste, import, done, and the originals can disappear tomorrow without your gallery noticing.

Frequently asked questions

Does Snug Gallery host the images I import from a URL?

No. Shopify downloads each image into your store's Files library and your storefront serves that copy. The app keeps nothing. If the original host later removes or changes the picture, the gallery is unaffected because it never pointed at the original address.

Why was my http:// link refused?

Only https:// addresses are accepted, because Shopify fetches the file on your behalf and an unencrypted download could be altered in transit. The same check refuses links with embedded passwords, custom ports, bare IP addresses and private-network names such as .local or .internal. Ask the host for an https link; nearly all of them have one.

Can I paste a Dropbox or Google Drive share link?

The share link usually points at a preview page, not the image, so the fetch fails even though the address looks fine. Use the direct-download form instead. On Dropbox, change dl=0 to dl=1 at the end of the link. Elsewhere, right-click the picture and copy the image address rather than the page address.

What happens to files that were created if the import fails part way?

If the gallery is full by the time the new files are added, Snug Gallery deletes the files it created during that import so nothing is left orphaned in your library. Files picked from Shopify Files or from your products are never deleted by the app. If an address is refused, the import stops before any file is created at all.

How many URLs can I import at once?

As many as the gallery has room for. Each plan sets a per-gallery limit (25 images on Free, 1,000 on Standard and Unlimited) and the page shows how many slots remain. If the pasted list is longer than the remaining room, nothing is fetched and the error tells you how many more you can add.

More guides