[Skip to main content](#vessel-content)

#   Add custom field image to product

##

- **[novo](/forum/user/37124-novo "View novo's Profile")**
- [![novo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/37124-novo "View novo's Profile") Topic Author
- [ Offline](/forum/user/37124-novo)

Less More

- Posts: 3
- Thank you received: 0
-
-

11 years 1 month ago [\#213527](#213527) by [novo](/forum/user/37124-novo "View novo's Profile")  *[Add custom field image to product](/forum/31-development/879141-add-custom-field-image-to-product#213527 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5  Hi there,  I'm looking to use animated gifs as the featured image for products listed on the overall shop pages. Hikashop creates static images when uploaded to the product page, so I have currently added a custom field (ajax image) as a workaround, and am hoping to call these images using php on the views / product / img + field page in the backend.  I've had a good search and can't find anything that answers my query. I can add:  row-&gt;featuredimage; ?&gt;  Which gives me the image filename, but also with added numbers on which are either caching or to keep the img secret? Either way calling the image that way doesn't work (the link works if I remove the numbers but I don't know how to call the image without these).  I then tried using the field class method that I read about:  getFields('',$element,'product'); echo $fieldsClass-&gt;show($fields, $this-&gt;row-&gt;featuredimage); ?&gt;  Which displays an image, but again it is a static thumbnail and not the original image. I need to show the original, animated gif.  Many thanks for your help!  Graham")* was created by *[novo](/forum/user/37124-novo "View novo's Profile")*

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 2.5.28
-- PHP version -- : 5.5

Hi there,

I'm looking to use animated gifs as the featured image for products listed on the overall shop pages. Hikashop creates static images when uploaded to the product page, so I have currently added a custom field (ajax image) as a workaround, and am hoping to call these images using php on the views / product / img + field page in the backend.

I've had a good search and can't find anything that answers my query. I can add:

&lt;?php echo $this-&gt;row-&gt;featuredimage; ?&gt;

Which gives me the image filename, but also with added numbers on which are either caching or to keep the img secret? Either way calling the image that way doesn't work (the link works if I remove the numbers but I don't know how to call the image without these).

I then tried using the field class method that I read about:

&lt;?php
$fieldsClass = hikashop_get('class.field');
$element=null;
$fields = $fieldsClass-&gt;getFields('',$element,'product');
echo $fieldsClass-&gt;show($fields, $this-&gt;row-&gt;featuredimage); ?&gt;

Which displays an image, but again it is a static thumbnail and not the original image. I need to show the original, animated gif.

Many thanks for your help!

Graham

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3OTE0MS1hZGQtY3VzdG9tLWZpZWxkLWltYWdlLXRvLXByb2R1Y3Q/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 1 month ago [\#213541](#213541) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add custom field image to product](/forum/31-development/879141-add-custom-field-image-to-product#213541 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5  Hi there,  I'm looking to use animated gifs as the featured image for products listed on the overall shop pages. Hikashop creates static images when uploaded to the product page, so I have currently added a custom field (ajax image) as a workaround, and am hoping to call these images using php on the views / product / img + field page in the backend.  I've had a good search and can't find anything that answers my query. I can add:  row-&gt;featuredimage; ?&gt;  Which gives me the image filename, but also with added numbers on which are either caching or to keep the img secret? Either way calling the image that way doesn't work (the link works if I remove the numbers but I don't know how to call the image without these).  I then tried using the field class method that I read about:  getFields('',$element,'product'); echo $fieldsClass-&gt;show($fields, $this-&gt;row-&gt;featuredimage); ?&gt;  Which displays an image, but again it is a static thumbnail and not the original image. I need to show the original, animated gif.  Many thanks for your help!  Graham")*

Hi,

The custom fields work the same as the normal image system and automatically resize the images when they are too big for the size configured.
The simplest is to use the normal image system. Then, in the file "listing_img_title" of the "product" view via the menu Display&gt;views, change the code:
$img-&gt;url
to:
$img-&gt;origin_url

That way, it will use the original image you uploaded instead of the resized version and you'll see the animation.

The following user(s) said Thank You: [novo](/forum/user/37124-novo "View novo's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3OTE0MS1hZGQtY3VzdG9tLWZpZWxkLWltYWdlLXRvLXByb2R1Y3Q/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[novo](/forum/user/37124-novo "View novo's Profile")**
- [![novo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/37124-novo "View novo's Profile") Topic Author
- [ Offline](/forum/user/37124-novo)

Less More

- Posts: 3
- Thank you received: 0
-
-

11 years 1 month ago [\#213548](#213548) by [novo](/forum/user/37124-novo "View novo's Profile")  Replied by *[novo](/forum/user/37124-novo "View novo's Profile")* on topic *[Add custom field image to product](/forum/31-development/879141-add-custom-field-image-to-product#213548 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5  Hi there,  I'm looking to use animated gifs as the featured image for products listed on the overall shop pages. Hikashop creates static images when uploaded to the product page, so I have currently added a custom field (ajax image) as a workaround, and am hoping to call these images using php on the views / product / img + field page in the backend.  I've had a good search and can't find anything that answers my query. I can add:  row-&gt;featuredimage; ?&gt;  Which gives me the image filename, but also with added numbers on which are either caching or to keep the img secret? Either way calling the image that way doesn't work (the link works if I remove the numbers but I don't know how to call the image without these).  I then tried using the field class method that I read about:  getFields('',$element,'product'); echo $fieldsClass-&gt;show($fields, $this-&gt;row-&gt;featuredimage); ?&gt;  Which displays an image, but again it is a static thumbnail and not the original image. I need to show the original, animated gif.  Many thanks for your help!  Graham")*

Thank you Nicolas, that solved my problem!! Anyone wanting animated GIFs in Hikashop this is the way! ![:)](/media/kunena/emoticons/8.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3OTE0MS1hZGQtY3VzdG9tLWZpZWxkLWltYWdlLXRvLXByb2R1Y3Q/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.172 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
