Skip to main content
Solved

Les images sont récupérées en http:// sur l'API Klaviyo


Forum|alt.badge.img+1
  • Contributor I
  • 2 replies

Bonjour, 

 

Suite à la mise en ligne du site d’un client, nous avons lancé les e-mails de relance panier, mais nous remarquons que les images dans les données d’événement ont un URL en http://. (ce qui pose des soucis d’affichage des images sur gmail). 

Pour information, Klaviyo est connecté au site (Prestashop) via le module PrestaShop Automation avec Klaviyo.

Seulement, ces images sont bien hébergées sur un serveur sécurisé. Si j’accède à mes images depuis Prestashop, elles sont bien en https://. Idem si j’exporte les produits depuis prestashop, l’URL de mes images est bien en https://

 

 

Un extract de l’API pour vous montrer que les images sont directement récupérées en http:// (ligne image_url) : 

"line_items":[{"id_product":1465,"id_supplier":0,"id_manufacturer":55,"id_category_default":15,"id_shop_default":1,"id_tax_rules_group":1,"on_sale":0,"online_only":0,"ean13":"3264680028854","isbn":"","upc":"","mpn":"","ecotax":"0.000000","quantity":0,"minimal_quantity":1,"low_stock_threshold":null,"low_stock_alert":0,"price":"14.541667","wholesale_price":"0.000000","unity":"","unit_price":"0.000000","unit_price_ratio":"0.000000","additional_shipping_cost":"0.000000","reference":"M92F287E46","supplier_reference":"","location":"","width":"0.000000","height":"0.000000","depth":"0.000000","weight":"0.000000","out_of_stock":2,"additional_delivery_times":1,"quantity_discount":0,"customizable":0,"uploadable_files":0,"text_fields":0,"active":1,"redirect_type":"default","id_type_redirected":0,"available_for_order":1,"available_date":"0000-00-00","show_condition":0,"condition":"new","show_price":1,"indexed":0,"visibility":"both","cache_is_pack":0,"cache_has_attachments":0,"is_virtual":0,"cache_default_attribute":0,"date_add":"2024-08-14 10:43:15","date_upd":"2025-04-03 15:01:46","advanced_stock_management":0,"pack_stock_type":3,"state":1,"product_type":"","maximal_quantity":0,"is_medic":0,"sc_hs_code":"0","sc_country_of_origin":"","id_shop":1,"id_order_detail":46,"id_order":32,"id_order_invoice":31,"id_warehouse":0,"product_id":1465,"product_attribute_id":0,"id_customization":0,"product_name":"Nuxe cr\u00e8me fraiche de beaute cr\u00e8me riche hydratante 48h 30ml","product_quantity":1,"product_quantity_in_stock":1,"product_quantity_refunded":0,"product_quantity_return":0,"product_quantity_reinjected":0,"product_price":14.54,"reduction_percent":"0.00","reduction_amount":"0.000000","reduction_amount_tax_incl":"0.000000","reduction_amount_tax_excl":"0.000000","group_reduction":"0.00","product_quantity_discount":"0.000000","product_ean13":"3264680028854","product_isbn":"","product_upc":"","product_mpn":"","product_reference":"M92F287E46","product_supplier_reference":"","product_weight":"0.000000","tax_computation_method":0,"tax_name":"TVA FR 20%","tax_rate":20,"ecotax_tax_rate":"0.000","discount_quantity_applied":0,"download_hash":"","download_nb":0,"download_deadline":"0000-00-00 00:00:00","total_price_tax_incl":"17.450000","total_price_tax_excl":"14.540000","unit_price_tax_incl":"17.450000","unit_price_tax_excl":"14.541667","total_shipping_price_tax_incl":"0.000000","total_shipping_price_tax_excl":"0.000000","purchase_supplier_price":"0.000000","original_product_price":"14.541667","original_wholesale_price":"0.000000","total_refunded_tax_excl":"0.000000","total_refunded_tax_incl":"0.000000","sc_attr_infos_v1":null,"image":{"id":15962122,"id_shop_list":[],"image_format":"jpg","force_id":false,"id_image":15962122,"id_product":1465,"position":1,"cover":"1","legend":{"1":""},"source_index":"\/home\/sites\/pharmacie-aesiel\/app\/web\/img\/p\/index.php"},"image_size":null,"current_stock":1,"reduction_type":0,"reduction_applies":false,"tax_calculator":{"taxes":[{"id":1,"id_shop_list":[],"force_id":false,"name":{"1":"TVA FR 20%"},"rate":"20.000","active":1,"deleted":0}],"computation_method":0},"product_price_wt":17.45,"product_price_wt_but_ecotax":17.45,"total_wt":"17.450000","total_price":"14.540000","customizedDatas":null,"customizationQuantityTotal":0,"id_address_delivery":5,"categories":{"2":{"id_category":2,"name":"Accueil","link_rewrite":"accueil"},"15":{"id_category":15,"name":"Hydratant visage","link_rewrite":"hydratant-visage"},"657":{"id_category":657,"name":"Hydratant","link_rewrite":"hydratant"}},"image_url":"http:\/\/www.aesiel.com\/img\/p\/1\/5\/9\/6\/2\/1\/2\/2\/15962122.jpg","tags":[]}],"date_add_utc":"2025-02-27 07:47:10","date_upd_utc":"2025-03-03 08:04:29","applied_cart_rule_codes":[],"mapped_order_status":"klaviyops-statuses-refunded"}],"next_cursor":""}

 

Savez-vous d’où peut venir le problème ? 

Merci, 

Eva

Best answer by ross_hopkins

Hi Eva,

Thanks for asking the community for help!

I have translated your post, so forgive me if I have misunderstood. Also, I am not experienced with Prestashop. Nonetheless, I thought I’d share some ideas!

  1. I wonder if there are any settings in Prestashop relating to images that dictate whether an image url is stored as http or https. A quick Google search didn’t return anything obvious (which you’ve likely already found), but there were some references to changing server configuration. Are you hosting Prestashop yourself or hosted by them.
  2. If you’re embedding images from the event data, you can try using the token syntax {{ event.image_url | replace: "http://", "https://" }} and this should rewrite the image location within the email. 

Let me know what you think of the above, or if the 2nd option works for you.

Thanks,

Ross

View original
Did this topic or the replies in the thread help you find an answer to your question?

2 replies

ross_hopkins
Problem Solver II
Forum|alt.badge.img+7
  • 2025 Champion
  • 20 replies
  • Answer
  • April 9, 2025

Hi Eva,

Thanks for asking the community for help!

I have translated your post, so forgive me if I have misunderstood. Also, I am not experienced with Prestashop. Nonetheless, I thought I’d share some ideas!

  1. I wonder if there are any settings in Prestashop relating to images that dictate whether an image url is stored as http or https. A quick Google search didn’t return anything obvious (which you’ve likely already found), but there were some references to changing server configuration. Are you hosting Prestashop yourself or hosted by them.
  2. If you’re embedding images from the event data, you can try using the token syntax {{ event.image_url | replace: "http://", "https://" }} and this should rewrite the image location within the email. 

Let me know what you think of the above, or if the 2nd option works for you.

Thanks,

Ross


Forum|alt.badge.img+1
  • Author
  • Contributor I
  • 2 replies
  • April 10, 2025

Hi Ross, 

 

Thank you so much !! 

I tried the 2nd option, it wasn’t exactly the token syntax you wrote but it was a similar syntax for me :  

{{ item.Image|find_replace:"http|https" }}

 

For the first option, there's indeed a parameter in Prestashop that's linked to all the URLs on the site, not just the images. We don't host his site, but the host had confirmed that everything was fine on his end.

Thank you again, it work perfectly now !

Eva