How can I export gallery images from SquareSpace? - image

SquareSpace does not offer any way to export uploaded content directly. The only export option available is for WordPress, but this only generates a small XML file. What is the best way to download the actual image files from a gallery, other than right-clicking each image and choosing "Save as..."?

This worked for me [Python]. If you take the XML file that is exported for you, you can run the following against it.
I had only .png images uploaded. You will have to modify to include jpg and other image file formats.
import requests
import shutil
import xml.etree.ElementTree as ET
tree = ET.parse('filename.xml')
root = tree.getroot()
for i in root.findall('wp:attachment_url'):
print(i)
images = set([elem.text for elem in root.iter() if elem.tag=='link' and '.png' in elem.text])
for img in images:
resp = requests.get(img+'?format=3000w', stream=True)
local_file = open(f'images/{img.split("/")[-1]}', 'wb')
resp.raw.decode_content = True
shutil.copyfileobj(resp.raw, local_file)
del resp

In Chrome: File > Save Page As > Web Page Complete
Do this for each page that you want to download the images from.

I just spent way too long figuring out how to do this, so I'm leaving this here in hopes that it will save someone else time. It's not pretty, and it involves a browser extension, but I believe this is the most efficient way. Broadly speaking, this is what the process looks like:
Set up new local WordPress installation. http://www.wpbeginner.com/wp-tutorials/how-to-create-a-local-wordpress-site-using-xampp/
Export your SquareSpace site for WordPress and import it into the new installation. Ignore errors about attachments. All image galleries will now show up as pages in WordPress, with each image hotlinked to the medium-sized version of the image in the original SquareSpace site. https://support.squarespace.com/hc/en-us/articles/206566687-Exporting-your-site
Install a browser extension that lets you bulk-download images on a webpage. I used this Chrome extension: https://chrome.google.com/webstore/detail/bulk-image-downloader/lamfengpphafgjdgacmmnpakdphmjlji
Repeat the following steps for each gallery:
On the page editor, switch to text view. Copy the HTML into your favorite text editor, and use the find/replace feature to replace ".JPG" with ".JPG?format=2500w" on every image URL to force the full-size resolution. Paste the updated HTML back into WordPress and update the page.
View the updated page, and use the browser extension you installed earlier to download all the images on the page. If you have a large gallery, you might have to scroll down to the bottom of the page to force all the images to load before downloading them.
That's it. All said and done, it's a pretty simple and straightforward process. I went through a lot of different WordPress plugins in an attempt to rehost the external links to the local wp-content folder, export the media library by post, etc. This ended up being much faster and much simpler. Hope it saves you some time.

If you don't have too many images, you can do them one at a time from a gallery. While viewing a gallery (Chrome) I can right-click and open the image in a new tab and then save that (getting rid of the parameters after *.jpeg )

You can use this repo to download the images from Squarespace. It has a Tkinter GUI to make it easier to use :)
I just coded it and it works fine on my end.
Github link: https://github.com/Mascobot/squarespace_image_downloader

I downloaded the Image Downloader plugin from Chrome. Super easy to download all images into folders. Once installed, go to the URL of your website page, hit the plugin, and create a download folder. Done.

Here's an alternative:
Use a crawler like ScreamingFrog and crawl your entire domain.
Copy all of your image URLs.
Download the Chrome Addon 'Tab Save' and paste all the links in there.
Download them. Done!

Copy the image and open it in a photo editor like Preview and then export it.
That works well for a few images but not so well for many.
Or screen shots. Make the image as large as possible and screen shoot it that way.

Related

Is there a fast way of gathering image files from external sources (Chrome Developer Tab)

Let's say I visit a website named abc.xyz.
When I get to the website, I see the website runs a javascript script to create an interactive book. Obviously, the book must have image files for each page.
Now let's say I go to the developer tools tab and go to the sources tab to find the images - sure enough, I find them. However, the images come from a folder and domain named xyz.abc that displays a 403 error when accessed.
Is there a faster way of gathering these image files than visiting the links for every single image and individually saving every single image (Bare in mind the images themselves are not restricted access)?
Real World Example:
Image showing files under the sources tab.
In the image above, you can see there are several image files located in a folder (hundreds, in fact). The domain and folder the images reside in display 403 errors when accessed, however the images themselves are not restricted. To download the images, you can individually get the link to each image and use "Save image as". However, this will be time-consuming for hundreds of images - is there a faster way to download all the images?
Edit: Furthermore, would there be a way to quickly order PDF images via a pre-existing page number on the PDF file.
To get images of a webpage , you can use python script to fetch all the image src which later u can perform any operations on it , such as copy it to your system or into your website .
I've used BeautifulSoup for webscraping
from bs4 import BeautifulSoup
import requests
page = requests.get("https://stackoverflow.com/questions/63939080/is-there-a-fast-way-of-gathering-image-files-from-external-sources-chrome-devel")
soup = BeautifulSoup(page.content, 'html.parser')
#print(soup.prettify())
for element in soup.find_all("img"):
try:
print(element['src'])
except Exception as e:
pass

Why pdftk produced pdf files will not render in Firefox?

I have a site - www.jcrocetta.com.
On this site I have 2 pdf files. One file has blurred data and the other is clear, both files were created with pdftk.
In order to blur out some personal data in the pdf I used Inkscape. But Inkscape only opens/edits one PDF page at a time. After I made my edits in Inkscape I saved the files as .pdf formatted files. At that point I had three separate pdf files, pages 1 through 3. I then used pdftk to concatenate the 3 files into one.
The final pdftk-produced files are on www.jcrocetta.com. Just click the public information button.
In Chrome viewing inline works fine.
Downloading the file from Firefox works fine too.
But viewing inline on Firefox it renders blank pages. How can I fix this?
Also, I know that pdf files not produced with pdftk will render correctly on both Chrome and Firefox.
Thanks for your help.
FireFox has a lovely new feature: It now uses the PDF.js library to render PDF files, instead of calling out to an Adobe Reader plugin, or forcing you to save the file to disk. Unfortunately, it seem that PDF.js isn't quite perfect yet. A quick search shows that other people have the same issue, but the only "solution" I've seen offered boils down to "file a bug report at https://github.com/mozilla/pdf.js/issues or https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&component=PDF+Viewer".
Also: Do the three individual PDF files render in FireFox, before you use pdftk to concatenate them?

How to get external images into dreamweaver panel

my question is incredibly simple yet I haven't been able to find an answer online. I made a small image in photoshop and am trying to incorporate it in my current website. I don't know how to get the image into dreamweaver into the image folder in the dreamweaver panel.
You can copy the image into the image directory of your root folder and simply add the markup where you want to add the image.
<img src = "[your image link]" />
Or simply add the images using the files panel- Insert->Images->Select your image then press ok.
try the following
1- ctrl + Alt + I and choose your image from the dialog
2- copy manually the image you created to the website directory on your hard drive
hope this hepls!
Your image folder should be stored locally on your machine in your site-root folder.
In Photoshop: Save for Web Devices, Navigate to the Root Folder where your site is stored, Open Image Folder and Save Image in that location.
In Dreamweaver: Go to Files Panel, hit refresh button and the image should now appear in the images folder.
The easiest way to do this by far is too put your cursor on the part of the page you'd like you picture to reside.
Then using the top menus click "Insert" and then "Image", once you have done this you'll be able to find your image on your local computer or network and you will be prompted to save it to your site with the site directory already up - then just choose where to save your file.
It's best practice to save all images into the images folder.
Hope that helps!

Is there any way to know all unused images of a website from image folder?

Is there any tool you know which can find all unused images of a website from image folder. I want to identfiy all those image in the image folder which are not being as a inline imge in HTML and CSS Background. Is it possible using any tools, techniques?
You can use dreamweaver for this. In dreamweaver look in site files (press F8) in site menu select recreate site cache. Dreamweaver checks links in your Local Site folder and provides you with a report of all unused files, which you can either delete or re-link.
Hope this solves your problem.

Swapping an image during web development

I'm trying to see what a certain webpage would look like if I replaced a certain image with another. Rather than upload the image, edit the site, etc, each time I tweak it, I'd like to know if there's a way to change the image in the page to my local version while viewing the remote page.
I use Firebug for debugging web development usually, but I'm open to any other tool that might do this.
(It is absolutely impossible to search for this and find anything but questions about dynamic image swapping on a deployed website, so sorry if this is a duplicate.)
Added: I just tried substituting a file:/// URI pointing to the image (copied and pasted from the address bar after manually opening the image), and alas, it did not work — the image fails to change.
It seems to only work with the http[s] protocols (likely for security reasons). You can store your images on service like Dropbox, share the image or folder, then use the public URLs.
Really, you can use any web accessible images, so a local server would work too.
If your image is in a localhost server(not as file mind you) i think you can still put that localhost url in the firebug inspect element and it'll work.
Tried an absolute file path but it doesn't work apparently. So I guess you just have to make do with a localhost server image. That works for me
Quick and Lowtech Answer: Take a screen shot of the page open it in photoshop and drop the local image on a layer above the webpage image.
Hi if you are serving from a webserver, u probably can't point it to a file on ur local drive. Even if its localhost, u can't point to a local file c:/test.jpg for example. Its because the browser sorts of sandbox ur page so that scripts can't access local files.
One way is to upload the new file (new_file.jpg) to the webserver, give the image link an id
<img id="something1" src="test.jpg"/>
Using jQuery in the firebug watch window do
$("#something1").attr("src","new_file.jpg");
You should see the image change. If you are not using jQuery, you can use document.getElementById("something1") and get the element to modify.
Another way is to use http://makiapp.com/
You can overlay an image from you computer onto any website you look at with this. Very cool tool for lining up a comp with your code.
You can:
Drag your test image into Google Drive
Open it in a browser
Go to the actual image path
Use this path as a substitute in Firebug
It's almost as fast as working from a local drive.

Resources