K
K
Kirusha2017-02-15 00:44:43
PHP
Kirusha, 2017-02-15 00:44:43

Image generation automation, is it possible quickly?

Good day! There are galleries on the site, on the image of which watermarks are generated. via phpthumb. When uploading images for the first time, you need to open the page in the browser for the plugin to generate previews for all photos. Question: Is it possible to automate the generation of previews through cron or in some other way (php script?) so that I don't have to do it manually. For example, cause the loading of these pages as when opening a browser, because the generation of watermarks takes too much time.
site on modx revo, preview plugin - phpthumbon. Its calling code is:

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirusha, 2017-02-16
@kirusha

to emulate the opening of pages by the browser (thus starting the process of generating previews), you can use the ajax get function of jquery:

$.get(
  "/link_to_page.html",
  {
    page: 1
  },
  function(data){
    console.log(data);
  }
);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question