S
S
Senseich2018-06-09 13:42:30
gulp.js
Senseich, 2018-06-09 13:42:30

Is it possible to optimize hosted site files with Gulp via ftp?

Hello! Such a slightly strange question) Can galp work with a site via FTP? For the most part, I'm interested in image optimization, they are added daily to the site.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Balya, 2018-10-17
@Senseich

There are many plugins that allow you to work with FTP through Gulp, such as gulp-ssh .
In theory, you can set up a task that will download images, optimize them, and upload them back.
But if your task is simply to optimize the images on the site, it will be easier to use server-side utilities like imagemin and optipng .
This is how you can resize oversized images:
With such a command, it is easy to optimize all jeeps.
Well, there are options for PNG too: You can even set up these commands in cron and they will be run automatically periodically.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question