<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="166223" data-post-id="166223">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="drl123" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/drl123/120/8307_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  drl123
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Using CloudFront is not a must, but if you don’t do it, then you’ll be making multiple calls to Imagizer if the image with the same transformation is re-requested (i.e. even for a page refresh).  If you are running your own instances of Imagizer on EC2, that may not be an issue for you.  If you go the SAS route, you’ll be paying for every request.</p>
<p>Keep things simple at first and move to CF if you find you need to.</p>
<p>You could also run a processing job right after upload to build the resized versions using Imagizer and store them in S3 with the original, then just serve the S3 versions so you only pay Imagizer once per size/transformation.  If you do this, you may need a ‘processing’ state while the images are built and put on S3 before you could serve them.  You can orchestrate a lot of that work with AWS Lambda’s, which are also super cheap, and not burden the API server…just post back to the API when the images are all built.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="166223" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/image-processing-api-architecture/29617/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-166223" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="166223"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>