# Separating post images from post content to minimise upload size

**URL:** <https://discourse.gohugo.io/t/separating-post-images-from-post-content-to-minimise-upload-size/23836>\
**Category:** support\
**Created:** [March 6, 2020, 10:54am UTC](https://discourse.gohugo.io/t/separating-post-images-from-post-content-to-minimise-upload-size/23836 "2020-03-06T10:54:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![codebrane](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/codebrane/32/614_2.png) [@codebrane](https://discourse.gohugo.io/u/codebrane)\
**Post date:** [March 6, 2020, 10:54am UTC](https://discourse.gohugo.io/t/separating-post-images-from-post-content-to-minimise-upload-size/23836/1 "2020-03-06T10:54:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![maiki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/maiki/32/16384_2.png) [@maiki](https://discourse.gohugo.io/u/maiki)\
**Post date:** [March 6, 2020, 10:58am UTC](https://discourse.gohugo.io/t/separating-post-images-from-post-content-to-minimise-upload-size/23836/2 "2020-03-06T10:58:24Z")

</div>

> [@codebrane](#):
>
> Having a photography blog, the more I post, the bigger the zip file to be uploaded.

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

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [March 6, 2020, 10:58am UTC](https://discourse.gohugo.io/t/separating-post-images-from-post-content-to-minimise-upload-size/23836/3 "2020-03-06T10:58:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![codebrane](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/codebrane/32/614_2.png) [@codebrane](https://discourse.gohugo.io/u/codebrane)\
**Post date:** [March 6, 2020, 11:09am UTC](https://discourse.gohugo.io/t/separating-post-images-from-post-content-to-minimise-upload-size/23836/4 "2020-03-06T11:09:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [March 6, 2020, 11:38am UTC](https://discourse.gohugo.io/t/separating-post-images-from-post-content-to-minimise-upload-size/23836/5 "2020-03-06T11:38:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nfriedli](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/nfriedli/32/26027_2.png) [@nfriedli](https://discourse.gohugo.io/u/nfriedli)\
**Post date:** [March 6, 2020, 12:31pm UTC](https://discourse.gohugo.io/t/separating-post-images-from-post-content-to-minimise-upload-size/23836/6 "2020-03-06T12:31:13Z")

</div>

> [@codebrane](#):
>
> All I have is ftp.

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

---

<div class="post-metadata">

**Author:** ![codebrane](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/codebrane/32/614_2.png) [@codebrane](https://discourse.gohugo.io/u/codebrane)\
**Post date:** [March 6, 2020, 12:47pm UTC](https://discourse.gohugo.io/t/separating-post-images-from-post-content-to-minimise-upload-size/23836/7 "2020-03-06T12:47:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [March 8, 2020, 12:48pm UTC](https://discourse.gohugo.io/t/separating-post-images-from-post-content-to-minimise-upload-size/23836/8 "2020-03-08T12:48:02Z")

</div>

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