Skip to main content

Has anyone been able to choose a custom thumbnail for videos? There’s no option to choose one and the thumbnail is random.

 

If there’s an option to have a custom thumbnail this would increase performance a lot and be applicable to everyone on the platform. 

Hi @Dan L, great question! 

While this functionality isn’t currently supported natively within VideoAsk, it is possible if you’re willing to get a bit technical and use our API.

Let me know if this is something you’re interested in. If so, I can provide more details, but I don’t want to overwhelm you with technical information out of the gate.


@andrew_videoask Thanks for the reply! Yes, could you please provide more details on how to do this via API and I’ll forward it to our dev team so they can implement it.

 


@Dan L Sure! Here’s a sample script written in Python.

Keep in mind that this is kind of a hack-y workaround, so it may not be a perfect solution. However, it should get the job done.

import json
import requests

# Assign variables

api_token = ""
question_id = ""
organization_id = ""
thumbnail_file_path = ""

# Set headers for VideoAsk API calls

videoask_headers = {
'Authorization': f'Bearer {api_token}',
'content-type': 'application/json',
'organization_id': organization_id
}

# Get Media ID of first question

response = requests.request("GET", f"https://api.videoask.com/questions/{question_id}", headers=videoask_headers)
json_response = response.json()
media_id = json_responsen'media_id']

# Generate thumbnail upload URL

payload = json.dumps({
'extension': 'jpeg'
})

response = requests.request("POST", f"https://api.videoask.com/media/{media_id}/thumbnail-upload-url", headers=videoask_headers, data=payload)
json_response = response.json()
presigned_thumbnail_url = json_responsen'presigned_thumbnail_url']
thumbnail_object_key = json_responsen'thumbnail_object_key']

# Read and upload binary contents of image file

file = open(thumbnail_file_path, "rb")
file_contents = file.read()
file.close()

aws_headers = {
'content-type': 'image/jpeg'
}

requests.request("PUT", presigned_thumbnail_url, headers=aws_headers, data=file_contents)

# Confirm uploaded thumbnail

payload = json.dumps({
'thumbnail_object_key': thumbnail_object_key
})

requests.request("POST", f"https://api.videoask.com/media/{media_id}/confirm-thumbnail", headers=videoask_headers, data=payload)

I hope this helps! 


I like to add the custom thumbnail script in videoask. So where shall I write the script and upload it?


I have received a python script to add custom thumbnail in my videoask, but where shall I add that script?


Hey @Dan L I’ve added your question in here so that @andrew_videoask can help you with it 😁


We have our PHP based server, so it will be good if we get some PHP script (for adding custom thumbnail in videoask) so that we can run your script.


Hi @Dan L!

The code probably won’t make much sense unless you’re a developer. If you or your team aren’t versed in Python, you should be able to work with another developer to “translate” the code between languages.

As far as where you run the code, you’ll want to use an IDE. That’s a fancy way of saying a specific app that’s designed for running code. Personally, I use PyCharm but there are many IDEs out there.

IDEs are great for writing and testing code on a small scale, such as if you just want to change the thumbnail on one or two of your videoasks. But if you want to run the code at scale and automatically, then you’d want to run it on your own server.

I hope this helps!


Thanks, we have developed the API in PHP script and we are getting the response of the thumbnail being generated. But the image is not showing in the thumbnail section. Its rather showing as an empty file and when we are inspecting into it, the newly thumbnail that is created by us is showing the path name as below: “https://media.videoask.com/transcoded/xxxxxxxxxxxx/thumbnails/xyz.jpeg”, whereas the other thumbnails are showing as base64 encoded format. So, we have to encode the thumbnail in base64 as well in the API code ?


@Dan L That’s correct; you’ll want to read the image as binary content. 


Yes we are reading it in binary content and passing that data in PUT method in API call. We are getting the response with the thumbnail image , but the image is not showing in the thumbnail section.

 

 


@Dan L Can you share the binary content you’re sending?


@Dan L Even though the thumbnail isn’t appearing as expected in VideoAsk, I’d first check the link preview (using a tool like this one) to make sure that the thumbnail isn’t coming through there either. 


Below is the binary data that I am sending
����JFIFHH��C % !###&)&")"#"��C """""""""""""""""""""""""""""""""""""""""""""""""""���@"����E!1"AQaq���2B�#R��$br��%3C���D��4S�����7 !1AQaq"�������#2��BRb3C��?��Y�Wֱ]}�]'��Wx���*I�m)��R�Ԓ)�m�qZ�=�I-����+X��ۤ�Z�Jⵊ{I%���Wmk��%��)\V�Ҵ�,V�im������;k1Kb��{MIV�Km���jH�SKm�v�ڍ$�֊i\V�OiRD���*�m�=��qZ���͔��!���_eke-I�V�ib��mKRd����+i�&��+X�)�m�ԢB@��SKm��ډD���)��(e����f)LV�J�R��R���+J�x�m��f�{MI"+1JⵊV��qZ�J⵶��RKma���)ZjH���J����7N�X�BI�3?.�%��*�1��~��ew��m'R�?�Qm*w$�i�:��\ �Ր��w�s�<�?�� ��f4O$�`h�}�{�"3p,�b2< �^�F��q��q�4��RP�7,`��Q��b�I�Y~�0�2T�H�����hOP�x�h{���s{�^ZPZZ��<� ���A��X��� }�-������ÜZ]SU�>�l˭IaFu��X�\iAIW�� :f�묶T�C�hW؍���ۊuC�\-��$�?J1��>��=�#�C.$���r����Ud��#��d_� �#����R��S�����m�$]Q��a���_L��-5�/2� =��+��s�><R7!�lC�o��)B�sg< #����1�2E� �����K����þ�ڠ�u���t��&��f�;�D<��v�hr+*<�T�{�B9����KG��J����@'C��?��yl/���w�:��hr].��`.f���^��0n� ������\E�%��jBI aX�O��\�N��Y))Vz ]���5�����S�8{�c) ��do��ޮ������ݷ.�HY�\�av�Y ��� g֚m�j;{푔�j�(W�� ��8��R�Na����u�q�H��:!AÒCmkm.ErG�v��$6ֶ�R�5�MJ�$�֊i]��)�5$Jk�)lV�Oj4�"���)����u ����A)H�'���B�Uh�mf�Smkm �I'����ʹ�*Im��)��m+J�x�b��Y��Ҥ�+X�vֶҴԒ"��mkm=�����T�k�Nԣ��������R}��܄s��*��-�s��N˵��~��|��wU�`�z (y�u�B�_�o<��]<��n�GT�x��9u�9-aD�@�$gh�c�sixGy(OU�+�=,��C��zE|I�5��p�U~�旌�8�C�H_��>����'H�Rj�Nv+��|��BPP�#iu�F��芹��C6;3e�1����V�����@{c�Q�c����4�����ѭ�����z��ھ)Q�T���9v�����P��3�~�g�I�\w��.���Wr`'�6кb�݃KۭMc1�JG����I�ԕȰl󌤅0YX'��U�=uqa�e�瓍��?�?�kV���C+e�ԔT)�O����J_n�P ��|�GnI�|ʲ�ә��!=%-��6�=���|��P�Z܃+wd�7�8<z����i}�d��M�L�������9:��/)�se�0w47�hd����U�6�#_�7�� #�"�#��ڭ����@���Sak9�Rꔩ.v�PR�~܏�=]�����aJ���`�ហ|(�h��Ƒ��������I��e����ˎ�}=KAw� t�����Ai��i�ˊD��q�c>�� �վS���+��+* �ݞ�Ҳ�Z�s��S��(Ut�Վ����R�U|���<�O5�F�p�#���T��uяQ�C�N��~ !�u��6K8�q��C��Q�q��@��+��+��ؗ�\���\�^��p%����"�R�Im�{4��pg�~g�Nڌ��C -�u�8�T�vԲ��O�qޙzC' ��#�~��u?o��|5�sj�z�����rz?*���d�,�U��K�*1��d"1J�;B���<$ǭ��R��S�X�)�<�V���<J��ON��%�k��o����K�8t�4i���kC�������T昀f_Z^��E��>x<�m���ؐT��8��Ԇ�������fR��Fz6?����"I�ɀ6�@��1^�ix1��he�;���W8��-��mu���H���J���OiiIm��J��Ҵ����m�qZ�+MI=����+X�iRKmkm-��)�*ID��r��-���V�����P%'�P? V�Պ<׭w+����!���д�%�X8���2�Ձ�ؒ|3��*��7��j_�a];TC���ظ�3�J�7y�~M����{t]� י�ǼP��y�uF����1c�F��s`(z����w/iy�yXi�`% ��ϝW���R0 �ʗC�4�JZ���r4�x�Ph�og��ʏ0p�v(xz:"���' �}|����bKN���±�*�j6ޜ;} i��6�#���eb�����S!�t�^_�9��^|�$=�j��8i���@�u�6�->j 4���Tժ؄{Wԁ9�Q�P5���ى�ߨz�p�f���0z�u�QR�h>榤G-��� �YrR��x��<�ˑ겇Ua{3 n\�J�� l�g9�*ⶹ�>@U�昗����߻W�����e^���KnR�k-'{��/��.��48�ݟ��8P��9�I�|���ô|T\�pq��j���ؐ����iM��l<k�������i,�A�H�RA�ȡ�����ڊgy��1���a����x}9�R,2�M�a�p���H4�x%\��0cks�d���z�W_�Wn�k��P��^�7�a�'�D���ŝ�k�'�K�㟸ޗ��w+pH���je��59�G��ğ��^TILIk�Y±���)F$?+Q3(�_Q)�`�Ldԏ��W!��$��m��!�q6hkq�޷<��m@$��(� �g�AZF�D�bKv���]�PJ�p�Ul���HjM����Gl���7����+��yPaI�$��:F�'��P�E�b�v�Ymo�zwlȚ�θ1 m-�)�dp2@�("4�� i��Z�Jz�S_J�y.�8JN3��Q� �T�F��:�s�5���p��X=���U��07S��~���G���b:�ɂ�\KQ��:H�#8�.���kqlBlKX�JNH'̓��5R��Ӎˋm�894�?��7K#����N��+��v��������m���y�O����m�i$�Y�Smk�Eq���S�s��J�I�\� '���f��!$��Yo�T �t���OH�)������)�:��p����OU��䚮YC��) F~Y��- Kb&�=P��:������T ������{;=��/�ݭ�n����_B*�jX/i�HQC�$�8q�u �qTK]�����od��/�M�B��(�8=z�VNd=/��F�*�q�rOSQ���4�F�K��)- ~RI��W��������R���T0�����af;�w��aT�wj�? Mo���J B��|i��`z�ý� �XN�Ȧs��V�*:� ��w*#R� ۣ3���W������v>S%��'�$e���(��ܛO)i�1���#G1�5D���2�wNG�䟟w�T�r~�ih�:-K$��'uk��Ժd�� ZA )Xq�hZr��v�A�Z�����_�T���ӫ�����NaI� -���+��ڣ�h���ֽ���F��+1^������w��RJ����������+x���W���3��FR��g�vb��qoם+���h�����ym\�!lj$t�}��$z�Е��Q9�zm�����:���A� 0�O����Z��&D��KW�������d��e��d5��� �|��e�����8�3}{�Z;軘�f8�_fr���eŝۉg���{G7�y�!Kv*ҦR�<�8���Am��l��D���5���4\F�`ۯ�Lk�^3¾' ݉_ƪ�y(!HQ �<(��t��!�p���������l`ҊB���r�J�f�w�A S{��#��SL<�hJe������K DK�YJ��S��#����8�g���8�H�e\WT����1�(NG��®️�r����v\ q��ی�y>���P��q8 9A��Üއ�Dou��f�J����^�Ӷ�q�D]� ��,�ٲ��q���?�S�ܓh�Y���K��)9#�ބl�D{�e��*V������Բ��}hFSLs���i߸����7ڠ�m�|3�t��Q�������|���~ �}�����@h t)��%T���u�4�ZT�i�$���H넁�Θ ��7)\$z}�ٸ�����o ح��@s�9��(��Y� ;�d'̍m!�V0��w$�zTz��C�O���JB� N5�)V��u���R4ҷ���m��p��o��G�½*�') I�� �����!Y���'�4?3v���#5�D,9�z�(_R��/l�Z�rh�$��h^cv���O$���޳�%$� Ǎ��M,��zyQ։��ϊG��C���Hmm<��IK�QJ���#���Ͷ�� <���3��qE���2ޫ8!�I/�����$7<^ Q��S��S���;��T��`~Ȃ�c�ڶ}�+d�+ަ�@�NA�Ii��������E�ɩJ�.�Z�v�$������u5:jdHS�@�`�� ~!��I* M<�%�RD$r\J����+<�4�}TM���x��.t#�YAR�À�Qவ�x&�ZZiL���қk6Ҙ��{կ)���͢��f)ZT��Z�J����WFd��]��Ȳy�����Ax���k��t�E��N!� �@���S="h!��!)?����-̈�;� #�Eqq��iJW������ �b��?�I�#����? �m��^����$�ϢE� ���?*��U�����ծWb�h���¤�1D�"CC.�;�x���y�������R��������:�ʼn�\y#� ։����V�`Z��hYઆ5M�N���ů.m�Oᮌ�CmLJT$���Xr5�Q��X�pq=��?��܀��d�60^�AU+ǃԮ�vf4�ȼHCR�p��ܤ����Κ���ӱչ�}x>gʺ�/�0��9C��N��f"�vPJ��N��j��]?��L:K��T�{�.ǔ�� ��G����L/ ��jǿ���2���2�B\�H���%��QbBI6��'�4�� ˀ��rGy=���^�=*��Ґ���)+A����B�B��J�w�eG)f�� ��<�zs]W�<.����G��>}������&��=�d�$���G�E�c�I�W��u+ro�lZ�)ޑ�9���eٮ{�VĖTA� +��d�%���c�� �,��xwk��G� �Y�$��M:��"�m?��w ������EX5B��Zmݪ��k\�w�C���@?��hvK��yӦ����� ��ղD\݇4�`�>���kbr�csͤ~1�C�Άȓ:ߏQ�O���g��/���)=px����͙~� a�8nR��O���xx��7-� ��I+!p.5�oj���X��)`�,��!��T� J~$�&���ݞhf�#Kt�H{�܄x���'� ���y�tW��`˔�h۽8��9uh@��4�r��q�=MW�uw�g���!`����u�T�s�n�¼�+Ӯ"�c��m�4v���t�04Yq*vUѦ�qQ�H�8'����Ô$��?>�5ˬ�4ʚs���]Mh����;/3')��.#��l�C1 -:X�u�� -�~��IJL{ť��0���hR>�&�'�#JB�yz,��;��0yJ� VȜ��D݌4�7�m:3�&+���Z��������-BҐʃSS�)G�}<�A@�"������H'��I�t���������2XO�{�~S�*>�ouN+��S�ƥθ����Y�HR6�U��P��"0*B��H88�b�<��{J��m+2����V��� �_�/��ҟ����� Q�X��P-Y%R\��IF�)\���9��sP�Ǻ�?��Ս��͸�:��IEn��6�y�7d���T�.�� ��Ot��.J���5KbtQ�?�� �(�%!�vdn�g��R٠�7e5�>�7 ��:��A�PZ�䫫��i*�@6 �9 �V3�n|ȭ,�HmaYJ�C���cd��6����:G6G�%���{4gz��5�A�!�%ͣ��w� �����Ҟ%(IKIϮ'�V��nQU*88Һ���j�s6ɽ��1�p�z�E�C;����e��D�X��`rŨ�PS��};��v�� �1�^��S�cݴ=����!�J<���}*�^�K4��$���"��<>c#�U'�+�z�1�J����,����tr����g������������A����]�u�нGfdF6�?�]��(70�%��>ҘN���q��/������ �Jrպ̷w��#���?z���{O�P�����B?}�jF�^�p ɐ�g�M+��}h.�1u�0�TP��$+ '�=qҽ;XC�j� '��%e{��<�c4A�ʼn��6����>K��Y�<Е�E�F$�㌈rV2����ߑ�k��wUǾ�"\C�Q;V���g�E����j��#�!wB9��9��d9~��˅.��̞p�,W?��s��v������ep��ɱ�?iڂC)M������8����_�E4���ۉ�Ԥ�P<>;�!�;��iCc��;��j.��;ڰ�(Zv�;�k'�?&~{�����nz``�%d�F��:*p�B�$� Xu����y�:������mn�6V����\�-� +D��ݑ�JM<���'�E7}� W�J��*PP8�C�m����9�^�n��ʳ�҆ݏ��ԑɭs5��u+9���)�O�Zg�$�eNd�+��-{�֕!���R����Uup��2�a��M��֣\���``n��:�>�i.}�QGt� �m�-�o�B�}FA��l��8԰��jNM9������؎3�ju(�������e0?�������,����J�Ŧh�� H?�څtS��n6�� I������aC֯�9�~���t%n +�T������P�`6��iS� 9���h�qdB�}�-�W(D�FL�G��m8�df%F�:��@p��'�P;�V�P��Z�jW$Z��Lv�$)'����O����&GdDg�����zP�d��p�?�E��۩ƕa��2�۫;� �j�Ѻ^먜m�ڢ��HX�,t:�u�~�i-��4�Y;��?Z����G�ou{H#�N�3�ǢyX\�H w�^��G��QF�= �*׉�Q�8m<��j���g~B��b0��R�<�ӒPO�Z!���M���ae�;ΠWQ�Ix���O(�D����YQ�(�"3B�W.C���p��%�C�n��橘WN���E'�C�T����nvY�� ��+RY�/����27�Q�Y?��AniP�w&Y�iQhY��>#���2L��|���]3l�C�H��������_�ן5��v j��m�G���V{�|�έ�wO�҃یg��$q�dy����ڗI*Jd�n�� �`��±���FxA~>Eר������&6h ۸Vޘ�1.:6�6C�C�ڤ�ѐ������0��p�?�(?Ҽ��Ut��͢և^x�ڶ�?���Q�KIy���d�0�I�|pO�b��ŝ�]��x���D���fɐG.8�����p�C�\�P���k�<��t�_µ��V��!������T��Iiƕ�����;ū����E ��,�S?�l�}���s���դ��\�Ϣ�M�t��}ܝ��M�w�Z���D���>O�|DD!_�8Έ�PA��~3�>�^*B���Z�Ω�n��j'ch�v䒯_�y�Bimڽ�4��!\�����m^DŨ� C��$��i��ZܝM�����ł�Q��4���erZi����S�R%3]}�&�c��'��N�hkvD��a���qHʉ�8��=�J��v! ��?:��C�.�6�����HȶZ�HP��+����(U;}�+z����r��w9Je$�_S�~�)*F�v��`���L�1�,5�/���u�5�]e�5��=p��e,6�P�2�^ 8qD7Bľ��jK��� RИL�JN� �q�|]��JG�����엡�An(�Ei��S{1��W�;��!ƛ�d�!IJ��I���Vl���s\#����Y�@N��@~�m�Ev��f���$$y��4Sc�d�z���B|���:�x��Xʘu+��L�l���'�^?B����.I�ң��?��)� B�J����x"��\�{j��NP����h�r�� �%C�@����ң`�v�Q) 8P>�j�| z-�����)I�r�|hGUؘv��{r�\o��>G�ʅ Zc#�?��.aO�AB��y���4�S��Z}3�R�*��?Z��-�s�p� ,���*i㹇��c�y�j3b��$��Zݔdut�YvI���:A屰���S+���pw�~��Ѧ�{|G�'�j���,(h���M��c*SI��c���6��]d���o))l�Q�������� iq��� �c��p�K���NH�D5�bX�$�$��0RBJ�����ɢK<~��t# l���}*�b������(I�H�U����㭀GwК�'!��GUS���sPm&�e����R�t�a#�R�z�8��m ��`�n͘���P�r<9�ViE��2S���U�9�5��U�J�m�����I�XN>`U�Y<��Ӹ;�EW� 1���Bif��}������~����~U�{t��jZ��2LV�������ۚZ]�B�wr�h?��sF�mL�7iqe�JVsʎί�Ɩ)���IB+X������ Aj�yx�*ς�C��=���L��^�-ϔ�G�\Ѵ��g�L�23��$�63���4���O��z� ��O`�!��!��px=�Ήc6�3�Ӈ��{2�5�x����j���hZ��r:�t�I�,I�����l�)y�����ڇd&"�f)P������T�������tq'%�0�$q�+%�1�uk@{��%�.m�)vϥ Wj��'>S����u))��'�Hk-2 �Y��k�(y��%��������7KQ��j:rr�,댖@o �e�q�>��bj <�DX�\���H����}Uv~���i���I����3}�Q�{ќ |?֋C��v,q�#��d~������ K ��1�#Laki 9�Pp{5 ��J�ʽbt{ ]a�ɔ���?�C��yGS��%�c��zx���~��z�-�I�8��^�!�#�pGO���8�S<�����������Ucw�"�, m��Ou�C���lHB�;��Yz�SG�z�n�3XS���S�q�ҫ9֔O�\�P��ˍ�w@$Ρ��]���Ce�x1��6h��˫ Z�2TBXo$򳓀*��Z�i��&� ۜQW(������P�za�ym�ŧ�h� u;�Nt��GaXQ�,�� )����<J�����C{�?��v�1��N��F]�ڌk�A�Rj@P��gi��?Z�$Ǖh�6:RQ)�����S��c7�t��䱅�9ر�����^E��M�+V]�Wy?�r��T����:9�a-?��� b�tc������r��8��zU×�2$�O0v) �Gx�M�bˊQ$df������8Z�U��SXpqL�&�#T�5s~0���RP�@����:Bd��s�k� $W�"\�*Df���Gj��H�*����T۩ia�,-I a9�x��5l��u汽��C{Ѓz��!��Mշ}u+I@FF FGƼ��7��I�,�XN�%�9 ڲG�U!/�<�6㍭g'g�L�өq# �'�9�X����k7k��*n�M�7�]&��S`: �z9u�?�c?PAV�ǶH����J����ե}��q��G�7F6@}���@��}*���t�!���\~�O��<�����jd�=��#�9�)d�L �� I��X�- ��7V���,:�a��s���� tρϝ @��ޮ�8��-''׊^�͵v'���_�t��g��t��X��Š�)(;�Ƿ��f1�����ޢ��]���fb� rl"Z{Dn�t�nY�m|�?_QS�{L�js�r�2��;)>� ��V������;S�+�yI�� ч���3}O���cM7���k��Y��O�F�����P�!4E�b����y��ܔ�����8����k��m�_�V��{��O��1�������;�4Ƿy!hXv�G��A�;E6�*+�/(߻9ψ��-Z'��������8�o�0�����*�����ٙ��"{iJ�O�� �tp�8-4�@m�� ���]l{O�h�!����YVC��d��oI�F����-n��Tz��ʪ?i�v����Gx%aKBs�8�ύ_߳#��ߘ��N�)�/�.L=m.�q���#�>H^�`|��m/i��X����a����⻷ t�J��"�r&{�\c��Á��N��NhvM��mhb ֺ�H�&��r\Z� Q#�Z9rXQ���D��u�<J�+J���hjC{MuxQD�ۤs�].ۺ��T�j>Є�M�+_�^@q��Q��ᰴz�9j�k��Q��-+�H��h!�G����X����v������r!�h;��c�F^�/�=�RY��i�M|B��)�P��w���1<��˃��0ӲM�]���.����?T��$?���3��?�)�z>*cY]T�hK�EA�%�c�c��4�U�C��4�w����>�y�,Q.�L����ص��+�d���>�-%���N�`>�B�;N6�����?(����։�_3�4�*"�bBH�4���IL�t� F��O���7{F�l2ڤĊܦ�Vw %xPO�~:���J8J��Q�$�m��/�|Q��EZZ7^5|�/J�ІZ��"��;~x�֞�)�.�o�w )} '�b���-�Cn�JHZH8 ��X����Y1vm9bs uA>)q���J�������.��uv.s�;'M���K��!��1�(�q �'��q{�p�d�dnG u�ݗ�ښp��L9#`��Y'e��ƙ�n�2�8�@�h��ָ�f��]û�H<�G��~��5$xR���#�)ly��O���Rz����T˸��=��'§����{M���%�����H�ݙ]�K�����0�𚓃qD�S�(o�qƆU�R� �Z��@J�LE���<�U�Q��?�-��G%�`u�?>4Y���d���|��9�0�8wHu+�ҌO6�ImiZ��6���mxy�.�%�nJь�����A�vW͔٢i��U!+I)4�S�\S{��:T+��-�ԸT�pOZ��qS��DžF-f�93�B�E��7��*������=j KNQe�"*�����ݵ��,FrJ�!Gr�{������]Y�Ev-��0�Tn�|��nK#��xw-1fD]��*ш�K�48�Z��(p���Um�����=�}����M�� W5t��H)�� )p)>��-��N�}�:Oޚ�G ���xd�At� �����̉�i�� ��2� JC�(մ�D������� �#Ђ��׊r���Ջk�6�v�W>C�Q�<�ҫ�5���Pvn�LJ�mĖ ˙�u8��܅�I;t���'�S\h�m�q�J\�ty!�����q���<��� �Vف��)�>�R����b����1B����qUV���.�h��+������$�Xŏ�L#�:�m]��Ӈ7��欸w-�����U��O5.��>�(�8�ݻw���G`�U�nI�����F�%G'm/m��;I}C.�dd~��j�ujJ�ش�����.>�����\�KLn1�^�S>�I��]/uO�@*�XW�5n\��a%*s]��_�!sH��tyC��qO��L�,ID� ��V�3�Á�ڇ����di�?���nS�S.�)a\�A�u��7v��T�Ԏi����la�Bݠ5�'zf����w���n��)����j���U���(�����j�m���,��2z�8� d�Ñ�1$3ȟ��SoXVe4���U��O����e�oi�<�x�Q�h���~�*rI����:х��VZAR��� c c*R��ʪ���M� Y��Gz<�s�?�h��x��v�O--��iZv}3�j;M�.w���� P�38�D'��NC�|k�dя��>����te�z!�D���<� TEݗ#*�3*\&��=���(�Y� 3���)H��2��ޅ&�V���T�G���%�#]Ky����\\y�>u�Vss���P<:����KY���l��4�d�֒i�L�H�r>Ʀ ;پ��hF8��(�r�����G�B\��z���e��h�� ��݂׵;f16LY=R0�}2���`�u��4v� u� ��J���r�#��L�"Z�dyg<�(��:��֟���q�7�Б��U��2ԡ��H\��D�d �-ȋ?�?eP��S8Z�Rגh��挻�q*��ۖ�|G(W�3?�SOq���S 5._gq�<-|�x��I+o܏=�U.�e�u�qr��e�F�$r|�Ԣ4M�'x$+5`s@�j�� �jR]���:�6�oPꤞ��B@H�x�A�w�.� ��r٩m-d]թ�{$%H$��=�Y��O^�,��G�j2ܥ%�T���0(�d�9��m�U@��R�¢�č �ۄ�J��ZR<����0�K�Zp,��Ȭ��x|J3D$�yNئ���F�ŷ��Ţ9H }ڣ�,���q �>��Sw� � �v����杕�=�D��R�)���-�,�HW�){����;��m.�a ���!6��sp>�+艶� � ���*�k�� �{��)�.ͻȓ!Yܝ�O��V��<��B�����e��F88�$�D����� ʀ�b`���|�9�ĒW2�ۭ*'$ ����{�Oݓ%������YH�ٜ�������v�@B��+3>�:dr�B�}Ed΁�04�ӿ��G�i��1]k�WMkke=*Cieh�(W��k��|��e�!kܜ��vT���i�l9�TH*��C��p��:� �ø;xk��jԴf������o �q��m�#��JYR\�����d��Ǐ�M�ʤ{�@��N"�c�-�r!ԟ�m�n�� &L~������O��S����~����t�����kqN����%8؀�C� "�����A���h�R����q'���8{���s��e�����3-R���ǀ>�4c�\�98x���71�-�qF1����HjD~�S���B�O�=���۴v��+�Z���j�Jf�#)Ko�(8 �7pJz���e��l���ד7e Y�U��Pf�Zʐ����Z�{Z���86CP��%��c�Z�Y>y�@�4�iP��n�#�Vs���ycºYt����Hhl�j"�ޕ��5���=%�.S�h(�5�����vSV�)G�牯=i�16�{rt���l�P�$RN9�Qr՞@�B��f7lb���$��)�Qΐ��\Z���4O�"\��)Sݨ� }⣔�m zrJ ��Jn�z�Od��<�F3�*�ZE�6S"����I����3Y�a��U�95l�5��KԊ� �)��@�]~�V�*���"8�T��t��|�S�%��� ��QJ��͊��p���wOؚ3��he�W�d� {�L�4Д̍����!��Dy����}}'sjj�U>oD���p�O��ݗ�])p�U?$v��K;p:g�#�����S�+o���{��n7�Z�A*'��)5���kVn�Ŏ���+���$x�ҙđ�G����iO��;���tqM�*��B�^C��d�I��e�E���5u��E�N; �4̘4�n H�Ѐ~UV;`j]������D���1R���|�/j��C�L��)^Q�0Hp;�� %i�m+���֚\֕})�^���~� 3��_�ᵥ*�C��~�TX���Nr��/�iF���uy�'�3L>�0� Z�!����� �f�������YC�(�U�;��ȓ0�v�Jԯ �ͷ9��g"T�I�zf�_q����?"(��C�(�������A�j�f��:H�����R��$i�������姊**�� 9����U9�P����W��JY��ƿ�I�j b ii�)X?ʲ�c�|8U=�2��e)��H�Td`Wm.{���v$��g=�ۡC����pn6���ª:��}�$����L^s���Ҵ�F���.�R#�º: :8��n<���V�m������^s���ȹ.5�"Tp�YǙ�`ʉ�;��N�!.�J�q�t�wZnDq��X5!{B�ܜ��0�t�H�4+wY+.1��\�R�a���윻zR�\/��NU��{B�����w�G�?�@ٟy�V�?CpƗ�12$%i'�� c�%�)#�ƒ^p�l�O���p���_!=��Ǣ�Z�좽�lw(s���SZ�d�#(�Ĉ�Ǩ�W��w��H�6�䨹m��~&��53o�\������xP>�P̲�|Z�;F\l�RO2��hB;$��ڇ��ΞP�4�G����{N�Žcix7!��n�AE ����U��<��fQ$�8��?Z~ �� ﷟�(���o�Ď $Ce�|�@?pk7���A�V�� %s\�V��f�r\wtvYـ8 W��QF����0<��H���S��n,E�Ȃ��Cs���E@�=���dH���V8)<��qř� �W�;��e�9��f�k@��|ղD�K J�v�r~���Z�l�����>F�o+Z���ҕ?��le4����I9r ᶱ�S��y$װsG6�pf���,�)I)A��sP:�R�o9 �>?�G@�J��.!ǻ�S)���\��� u�nQ�U�9�kq�ʷ:�A2�yB��JBT�n+�O��K6�vo�t�#���I�yw���,�� �Gލb���tCs���+�J����<�����<��O�5��kK�n� 8��)}Hv�i���.2}6�p�(TbVT$F@ .�����GN�7���$��S6�����%!`z-�'��I�6�W�R�k�|���-��k��#��Ss5�n�B�y'�uZ�n�V��5ݢ��K��.8I�'2KѦ��)�J��4�m� o�'�Z�0��uY�O�;�S;\ �}q��IǼ%މ��YǟC���V`6�k)�t���jNy�)m�!c��es@u����&-���>�D��H_� ]��?�+�IK$D@=A#�]9!ra���%;y���w�U%��u�?kp?=���K�Ɔ�����T*>TG��_�.?�ٜc�Wd�#��2R���݃*;T�^��u���{��!L�+������O���Og��)Ͳ�������ۍ�z�#+D4y>aXw*9RS'�����:ݵ��m�?�d-5 _�֑�-||��T��Ԣ����d�S�9���E�i��)�M�y�2y�]���&�j}�_2i���g�?! �H<�d���B<�x��=��Q *en>Y����֒��2�|E̻9o�p���`��.��22�����j�{2A8�xڒ�e=A�Erچ���ڕ���"�t��ĩ�@RO�Q��ص�BN��幧�MKBw�y�x�7˓�ҡ��^:T���$8q�c��84pK��jR����8QHn��Y����]��'�'#�Eu�ZpjX�R�4�T��Rj3O<�,��s;���@>@����:f��c�{��6�ȟ�R1�4~Z���Po ��| 7����\��é����&�~2���Э�C�I���,̳��{��W����ET�05ں���v�?h�:�.�8�Kj-�ky�����3c!�wU�w��V�(1�Z�Q_nTRRqR���$+&4įAh���RȂ9�Y����R���!s�/`�B 2�`�a)���p��Y�;R쓀�T��g���n������,tzݱ��v.�����&�%k�a{��L�3�C30nM����{k>���tT���o1��Q՞Pnd)]z}���gJu9)N�s#�B�P)?p�}`0ã� ��EY�_M� $�TW����Ф�ˀ���V׊�=�G��8�d�춎�T�������y�!!�6_}��)Jz�l���!l\�K�S��SȖ�È��l!�T�O�V�W�Re?sK�^^$�JRπ�6e�ʿ�z��R�s�h�~F���q�L .�k��a�2�� �mW�B��7���z6Đ>���)��s~�T3ș�q�v�EH�S��KG�uC0��?t�R����N݂��:�e(�,��#4���E���J�BV�syqM"!i��U��0�����M�va 7KDp&{��%bu�k�wqJ����r�RR�p��>5.���6����qj<(�T&{woxQ�#%���p��Κ�H�I�����d��|�p��O�U.#��d%QS��\�Yᅏ;���`�ٺ3�Ӝ|)�H"lGڠ����Җ� ��pq�L|�V፻� ?��i�շ#2�v��p���qV�Y���$7��


@Dan L Hmm, it looks like you may be using a different type of file encoding.

When I print the binary output of my file, it looks like this (truncated for brevity):

\x00\x87i\x00\x04\x00\x00\x00\x01\x00\x00\x00Z\x00\x00\x00\x00\x00\x00\x00\x90\x00\x00\x00\x01\x00\x00\x00\x90\x00\x00\x00\x01\x00\x03\x92\x86\x00\x07\x00\x00\x00\x12\x00\x00\x00\x84\xa0\x02\x00\x04\x00\x00\x00\x01\x00\x00\x06\xf2\xa0\x03\x00\x04\x00\x00\x00\x01\x00\x00\x03\xe4\x00\x00\x00\x00ASCII\x00\x00\x00Screenshot\x94\xfa\x02\x87\x00\x00\x00\tpHYs\x00\x00\x16%\x00\x00\x16%\x01IR$\xf0\x00\x00\x02\xd8iTXtXML:com.adobe.xmp\x00\x00\x00\x00\x00<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 6.0.0">\n   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\n      <rdf:Description rdf:about=""\n            xmlns:exif="http://ns.adobe.com/exif/1.0/"\n            xmlns:tiff="http://ns.adobe.com/tiff/1.0/">\n         <exif:PixelXDimension>1778</exif:PixelXDimension>\n         <exif:UserComment>Screenshot</exif:UserComment>\n         <exif:PixelYDimension>996</exif:PixelYDimension>\n         <tiff:ResolutionUnit>2</tiff:ResolutionUnit>\n         <tiff:YResolution>144</tiff:YResolution>\n         <tiff:XResolution>144</tiff:XResolution>\n         <tiff:Orientation>1</tiff:Orientation>\n      </rdf:Description>\n   </rdf:RDF>\n</x:xmpmeta>\n6\x15\xc4\xa2\x00\x00@\x00IDATx\x01\xec\xbd\xe1\xb6\xdbF\xb2tir\xde\xff)\xad\xfe\xd5\xf2\xb2\xfa\x01\xe6pbGf\x01\x94\xbe\xbb\xfa\xce\x8c-\xb5\xec\xde%\x1e\xa0P(\x00Gy2##\x12 \xf9\xf8\xf2\xf9\xd3\xeb\x97\xb7\xf6h\xff\xf1\xcb\xc7\xeb\xf5\xcbc6f$\xb3>\x9e\x8f_\x1e\xbf\xa4\xc3\xeb\x95\xfe\x83C_\xf9\xf7\xf8\xe5\x99>cm\x0c?\xf3\xf3\x91\x1f\xc6\xb3\xff\xedT\x1d{d.\xd3\xbem^\x1f\x8bh\x7f\xfd\xcf\xf8\x13\x7fnt\x04j\xc5_\xf3\x8f\xf97\x81\xc0K\xfe!\xff\x92\x7f&A\xc8\xbf\xd5\x1f\xea/\xf5\xa7\xfa\xdb\xfa\x83\xf5\x97*&\nK\xd6\x9f\xac\xbfY\


Hi @andrew_videoask 
We are doing first file_get_contents then base64_encode and this is how we are converting an image in binary content. 
Please let us know if you are supporting any other formatting.


@Dan L Can you try file_get_contents only? If that encodes the file contents as binary data, you shouldn’t need to use base64_encode.


Okay, we will try that out and get back to you. 


We have tried in both the ways by using :
1. file_get_contents() and then using base64_encode()
2. file_get_contents()

But still not showing the thumbnail icon.
Here is the links below:
#1. file_get_contents() and then using base64_encode()
https://www.dropbox.com/s/me5z8fst1qk2kgo/videoask.php?dl=0

#2. file_get_contents()
https://www.dropbox.com/s/xmdxb5bow6kw4sj/videoask_file_get_contents.php?dl=0

Please check at your end and suggest us for any changes in our code.


@Dan L Can you try this?

$file_contents = fopen("/windows/system32/ping.exe", "rb");

(You’ll need to replace the file path, of course.)


Okay thanks. We will try with the above code and get back to you.


We have tried using fopen() function as suggested by you.

But still not showing the thumbnail icon.
Here is the links below:
#1. https://www.dropbox.com/s/xmdxb5bow6kw4sj/videoask_file_get_contents.php?dl=0


@Dan L Can you share with me the thumbnail image you want to use? 

I can convert it to binary with my code, then you can hardcode that string into your code to see if it works.

If it does work, then we know for sure it’s some issue with the binary encoding.


Alternatively, you may find this Stack Overflow thread useful.


Here is the image that we are trying to upload as a thumbnail image for our testing purposes. Please convert it to binary code, so that we can hardcode that string into our code to see if it works.

 


Reply