It’s tough for me to say 100% why these things are happening without a bit more info about the project and which stacks are being used, and what project settings are configured. But I can probably make some educated guesses…
TL;DR:
The Quick Answer
I’ll guess that you’re using the Foundry image stack. If so, you might try using the built-in Site Image stack when you can. Although it will not have all Foundry functionality, it does have very efficient publishing.
Much Longer Explanation and More Suggestions
Why
Since you went into a lot of detail (thanks – it really makes answering easier ), I’ll give you the “why” behind this behavior.
I’m also giving this long answer so that @elixirgraphics has a post that he can direct other users to when they have similar questions.
The best way to use RapidWeaver Resources
The publish-once-for-everything behavior that you’d like is in the Site Image stack. This is the default in Stacks 4 in RapidWeaver 8. Just drag an image from the Finder into Stacks…
- A Site Image is created
- The image is automatically added to the RW Resources window
- If you drag the image in again it will just link to the existing resource
- It will be publish once, in the
/resources
folder, and as-is without file-type changes
- All advanced compression and meta-data will be maintained
The only downside is Site Images can’t be modified (scale/optimize/crop/etc). You need to do those modifications in another app before importing. However many users are doing advanced compression with tools like Squash, so as-is exporting has quickly become the best practice.
What if you use some other type of image?
There are three main types of images: the Site Image stack, the (old) Image stack, and Sidebar Images. I mentioned Site Images above, let’s talk about the other two: the built-in (old) Image stack, and Sidebar Images.
These two types are closely related. Both have the same publishing behavior, the only difference is the user interface. Image stacks are dropped directly into the layout and can be edited in-place with a double-click – Sidebar Images are dropped into a small image well in the sidebar along with other stack properties, they can’t be edited at all.
Image Stacks
This was the default image type prior to Stacks 4, and the only image type prior to Stacks 3, and is still the default in RW7. Image stacks allow the user to double-click and edit: scaling, cropping, rotation, file name, alt text, etc. Their default behavior is very conservative so that non-technical users get reasonable output with zero setup, but allow more technical users to edit and tweak their settings.
Since the Image stack is available in both RW7 and RW8, it must use the older RW7 mechanism for publishing: once per page, no exceptions. Prior to RW8 there wasn’t any other way to do things.
For a number of reasons, in Stacks v4.1 we may drop RW7 support (or at least limit it). This has allowed us to change the publishing behavior. In the Stacks v4.1 beta (being tested right now!), ALL IMAGES inside of partials will FINALLY get published ONLY ONCE for the WHOLE site. Yeah!
Sidebar Images
My guess is that you’re using Foundry. Foundry uses the Sidebar Images. These let users drag-and-drop images right into the sidebar with other settings. Sidebar images are very easy to use and take up very little space in the UI, which is nice – but this minimalism comes with a cost: no settings, no controls. Sidebar Images get default publishing behavior: (scaled to reasonable size, published to each page, PNG format, etc.).
Oops!
I want to issue a bit of a mia-culpa – this strange limited behavior is my fault – the limitations to the Sidebar Image were completely intentional – I made them like this on purpose. What on earth was I thinking???
I didn’t think sidebar images would be used as a default image type for large images in the layout. I imagined they would be used for small images like bullets and drop-caps – the sorts of images that most people really don’t care enough to fuss with their details – reasonable publishing with minimum user effort. The limitations of Sidebar Images are the main feature for that imagined use-case.
The way I envision the API will be used and the way it actually gets used are totally different.
This is just the nature of the business. Sometimes small details can change things in unexpected ways. As soon as I added sidebar images most stack developers gravitated to them immediately – using them as the default image type for everything.
The reason is simple: they have one “tiny” benefit (which is actually a huge benefit that I didn’t notice when I added it) – they give complete control over the HTML – so developers can avoid any extra superfluous wrappers and craft the exact <img>
tag that they need.
Unfortunately this situation painted me into a corner – the sidebar is very space constrained – adding extra options for editing or resource picking just doesn’t fit.
Sidebar Image Evolution (soon)
Sidebar images are evolving. A little at first, then a lot later on.
In the Stacks v4.1 beta Sidebar Images also get the publish-once behavior when inside of partials. But this tiny step forward is not nearly enough – they still need more features to reach parity with Site Images and/or Image stacks.
Moving Ahead (not so soon)
The next big change will add Site Image behavior to sidebar images. However this requires more from the RW API. RapidWeaver 9 (not yet public, so I can’t say too much) has a new and totally different resources API. This is great because it will allow us to add a lot more Resource compatibility everywhere, but also not-so-good because it requires a total rewrite of many parts of Stacks. It will be many months before we get Stacks working with this new API.
Stacks v4.1 – Beta Testing
I’ve mentioned the Stacks v4.1 beta a few times. If you’re reading this in fall 2020, then you can help us test the beta and see these changes in action by joining the Slack channel and downloading the beta. If you’re reading this later on, then there are probably other betas that need testing too. Please come join the Slack channel, say Hi, don’t be shy.
I always post links to the beta in the main chat channel, with details on how to install and how to report bugs.
If you stuck with me this far, thanks for reading. And happy Stacking!
Isaiah