Magento Gif upload - magento

I try to upload gif from admin panel of Magento2 for a feature, but it is not looping gif but a jpg at the frontend.
Looking for your advices which is also ok for Cache
Why dosent the uploaded Gif animated ? why isnt it looping ?

When you upload images to Magento i the Wysiwyg editor. it "prepares" your images for frontend. By doing so a version of the image is stored in cache preparation.
The function that handles this is not compatible with the .gif format, and therefore i takes the first image in the row of images contained in the .gif file.
You can upload you image with a FTP client like Filezilla or through Cpanel, and overwrite the gif you already uploaded. that way the function is not run on your file, and you will keep your animated image.
There is also modules that makes the Wysiwyg editor compatible with the .gif format, for more permanent soloutions.

Related

Adding Image in Magento Customized PDF (Extension)

I have an extension installed on my Magento in which I customized it to fit the my expectations.
But in my PDF that I customized, I want to place an image where the picture is placed on the media folder only,
The link of my image is like this http://xxxxxxxx.com/ecommerce/media/GlobalPdf/default/img/barcode.jpg
I can open the link onm the browser and it shows the image but when I included it on the XML, it does not show, it shows only a black box with a white X on it.
Am I missing something? I tried placing it on other locations but to no avail.

How to open image file using pdftron

I want to load an image file using the pdftron webviewer api.
For pdf files it's working fine but I want to load image files and add annotations to them.
In the user guide there is no information regarding working with images.
Yes, WebViewer can do this out of the box.
There are a number of image formats supported. Here is the breakdown.
PNG, JPEG
Simply pass the image URL to WebViewer initialDoc constructor parameter, or to WebViewer.loadDocument().
If your URL does not have a proper file extension, then you can do the following.
myWebViewer.loadDocument("mydomain/generic_url_to_image", {filename: "input.png"})
This works with both PDFNetJS Lean and Full editions.
TIFF, GIF, BMP
You can utilize the browser's HTML5 canvas to load the images, and then generate PNG/JPG from the HTML5 canvas, and then pass the follow the instructions above.
JP2 or multiple images in one document.
Using PDFNetJS Full edition, which does not come with the standard WebViewer download, you have full control over PDF creation.
PDFNetJS Full Download: http://pdftron.com/downloads/PDFNetJS.zip
Using PDFNetJS Full you would follow the AddImage sample code to construct a PDF with the image(s) in it.
http://pdftron.com/webviewer/pdfnetjs/config.html#file=samples/PDFNet/AddImageTest/AddImageTest.js

Download assets in it's original format in AEM

I want to download the asset in it's original format using AEM, is it possible? Currently, if I select one pdf or jpeg asset, and click download, it's downloaded as a zip file which includes the selected asset. Now I want to download it without a container zip, that's to say download it in it's original format.
If you are referring to PDF then that's how the download for PDF works because when a PDF is uploaded all it's contents are extracted as sub-assets. This behaviour can be changed via modifying the PDF extraction logic but it won't affect the download behaviour.
The logic behind this is that when an artefact is uploaded in AEM it becomes a DAM asset and rules governing to it's manipulation take over. For example, in case of PDF, a PDF asset is a collection of the original PDF and all it's images and thumbnail extractions. So when you are downloading something you are basically downloading the whole collection as AEM sees it.
Having said that, you can probably write a custom servlet and extend the DAM GUI to download just the PDF.
You can select the option as shown below, when selecting 'Download' action after selecting the asset to download, in Assets UI

Drupal theme - change slideshow images

Using Drupal 7, "business" theme, I want to change the default slideshow images of the theme to my own images.
The documentation says:
To change the Slide Images, Replace the slide-image-1.jpg,
slide-image-2.jpg and slide-image-3.jpg in the images folder of the
Business theme folder.
I did that, but images won't change.
I changed the images in sites/all/themes/business/images. And kept these original names.
The old images are not there anymore, but slideshow still displays the old images.
I tried clearing Drupal cache, wasn't the problem.
I'm guessing maybe a wrong dir?
Thanks in advance.
That is the correct directory for the slider images. Try clearing the cache in your own browser.
I would suggest, Don't go with hard-coded slideshow in theme, rather remove that slideshow from there and create new region. then create slideshow using view and flexslider which uses same CSS and javascript which makes you dynamic slideshow and you can add as many image you want.....

How to render uploaded photos with NodeJS and Express?

I generally post examples of my best shot at what I'm asking about, but in this case, I have no idea where to start (haven't uploaded photos before in other languages).
So how does one go about rendering uploaded photos. I'm using Node v0.4.2, Express 1.0.8, and Mongoose 1.0.16 and have uploading of images working (they end up in ~/tmp right now).
Thanks.
If you just want to render thumbnail versions of your uploaded images for display, try using the imagemagick wrapper node-imagemagick.
For example, you could store your hires-images in a data-folder on your server (lets say /data/images) and render thumbnail images into a web-accessible folder (on upload).
I do not recommend generating the thumbnails on the fly, as it can massively increase your server's load when a large image (especially vector formats like eps or pdf) is being rendered.
For imagemagick examples, consider reading up the docs for the convert command.

Resources