diff --git a/app/controllers/label_templates_controller.rb b/app/controllers/label_templates_controller.rb index 547691d1e..a1d235a94 100644 --- a/app/controllers/label_templates_controller.rb +++ b/app/controllers/label_templates_controller.rb @@ -130,7 +130,9 @@ class LabelTemplatesController < ApplicationController def zpl_preview service = LabelTemplatesPreviewService.new(params, current_user) - payload = service.generate_zpl_preview! + + # only render last generated label image + payload = service.generate_zpl_preview!.split.last if service.error.blank? render json: { base64_preview: payload }