Separating post images from post content to minimise upload size

Having a photography blog, the more I post, the bigger the zip file to be uploaded. Eventually it will be too big (for a rural connection speed). It’s already taking 20-30mins to upload the blog with a new post.

I realise there are other ways of dealing with this, such as putting the images in flickr and linking to them but I’d like to have a completely static site.

Would there be a way to keep post content and images separate? e.g. have all images in e.g. /images and reference them from there? That would allow uploading the blog zip which would be text only and only needing to upload the new folder inside the /images folder.

thanks,

Alistair

You should only be uploading the changes. Sounds like you are uploading the entire site each time.

1 Like

I would rather try to do something about your “upload strategy”:

  • Use rsync with the --checksum flag
  • Use something like “hugo deploy”

Note that I don’t know anything about what/where you host, but I would try to avoid uploading unchanged content.

All I have is ftp. So I can’t hugo deploy. I think it should be possible to move all images outside the blog and only have the text in the blog. So the structure on the server would be /blog and /blogimages but I’m not sure the hugo preview can deal with that as it serves out of /blog only

OK, what you can do is to

  1. Move your images “somewhere else”
  2. Then set up a /config/development environment with a different mount setup

Refer to the documentation for the content mounts. But this way, when you run “regular Hugo”, it will skip the images.

Some FTP clients have a “upload only if newer” or a “overwrite if size change” option!

My provider has actually implemented ssh/rsync so thanks for the pointer in that direction. Works a treat now.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.