class ActiveStorage::Preview

def processed

image is stored with the blob, it is only generated once.
Processing a preview generates an image from its blob and attaches the preview image to the blob. Because the preview

blob.preview(resize_to_limit: [100, 100]).processed.url

Processes the preview if it has not been processed yet. Returns the receiving +ActiveStorage::Preview+ instance for convenience:
def processed
  process unless processed?
  variant.processed if variant?
  self
end