FROM CACHE - fr_header

ajouter une image html uniquement sur la page d'accueil

an_dreas
Visiteur
2 0 1

Bonjour

je voudrais savoir comment ajouter une image via le code html uniquement sur la page d'accueil ?

merci d'avance

3 RÉPONSES 3

Nick
Shopify Staff (Retired)
4531 434 1024

Bonjour @an_dreas,

 

Nick here from Shopify. 

 

This is definitely possible and can be done by taking the following steps:

 

Cela est tout à fait possible et peut être fait en prenant les mesures suivantes:

 

You can use the "custom content" section for something like this (this section has a different across themes but offers the same functionality - but allows the user to add custom HTML). You would need to upload the image you wish to use to the Files section of your store admin, then get the URL and add it with the following code:

 

Vous pouvez utiliser la section "contenu personnalisé" pour quelque chose comme ceci (cette section peut porter un nom différent  du thème, mais offre les mêmes fonctionnalités global: elle permet à l'utilisateur d'ajouter du code HTML personnalisé). Vous devez télécharger l'image que vous souhaitez utiliser dans la section Fichiers de l'admin de votre boutique, puis obtenir l'URL et l'ajouter avec le code suivant:

 

<img src="https://cdn.shopify.com/s/files/votreURLici.jpg" />

And it should display the image for you. 

 

Et, ainsi, l'image devrait s'afficher.

 

You will get the URL from the Files section of your store admin next to the image. You can see an example of where this would be from the screenshot below:

 

L'URL s'obtient juste à droite de l'image. Vous pouvez vous référer à cette capture d'écran:

 

11-09-m3ldw-3db3u

 

Something extra is if you wanted to add some width to the image you can do so by adjusting the code slightly like below:

 

Aussi, si vous souhaitez ajuster la largeur de votre image, vous pouvez modifier le code ainsi:

 

<img src="https://cdn.shopify.com/s/files/votreURLici
.jpg" style="width: 400px;" />

I will also move this post to the French Shopify Community where someone who speaks French as their first language can see it.

 

Je vais également transférer ce poste dans la communauté française Shopify où une personne qui parle français comme langue maternelle peut le voir.

 

All the best, Nick

 

To learn more visit the Shopify Help Center or the Community Blog.

AYNI-treasures
Visiteur
1 0 0

Hi there, 

 

I managed adding an image thanks to the following code:

 

<p> <img src="..."></p>

 

But I'd like to horizontally center my image and can't make it happen. Could you please help? 

 

Thanks in advance, 

Chelsea. 

Andriano
Pionnier
146 5 11

Bonjour,

 

pour ajouter une image uniquement sur la page d'accueil. Il faut mettre le code html sur le fichier "theme.liquid".