• Hello,

    I use WP Retina 2x as well as WP Migrate DB Pro for just about every site. Since I work locally, if I’m uploading images to my local install, upon pushing to a live site the @2x images are not included in the WP Migrate DB Pro migration since they are not in the database.

    According to Delicious Brains, they check the db for media files that have been uploaded “the WordPress way”. Thus, @2x images generated by WP Retina 2x are not included in the migration.

    I understand why you would *not* have a db entry for the images to keep things lean but it would be good to have an option to save the WP Retina 2x created images to the db for situations like this.

    Uploading a single image and having the plugin create the retina sizes is so much easier and time saving but without having those images in the db means I have to upload them manually.

    Any ideas on how to resolve this or could this option possibly be included in a future version?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi,

    The only thing that would work is to add the retina images in the metadata, then they would be backup-ed. But it’s not a good idea I believe, for many reasons:

    – Retina for full-size can’t be added to the metadata, so this feature wouldn’t be 100% usable
    – Retina images takes a lot of place, so the backup would be much bigger; it’s simply better to regenerate the Retina images (and easy) after his backup is used
    – The metadata will be written with a lot more data, which will lead to slightly worse performance (now the plugin doesn’t use the DB and doesn’t slow down anything), and you would see those new Retina sizes everywhere in the admin, wouldn’t be as clean
    – I guess it would being also many many issues I am not thinking about right now ??

    So well, it’s better not to do this at all, only one pro against a lot of cons, I am afraid…

    Thread Starter joshuaiz

    (@joshuaiz)

    Hi Jordy!

    Thanks for the reply. After speaking with Delicious Brains they basically suggested the same thing.

    So is there some kind of action I could fire to automatically regenerate (or generate) the retina images on the target site once the migration is done using the wpmdb_migration_complete hook?

    Then this could be automated every time a migration is run.

    Plugin Author Jordy Meow

    (@tigroumeow)

    Indeed, I could use that hook to do something unfortunately the process of re-generating all the images takes time and need to be async. The only way is to push a button and have Javascript handles the progression. I could do this with WPCron and do it in the background little by little over a few days but that’s… a bit crazy ?? I don’t see a way to do this properly automatically I am afraid…

    On their side, it would be cool to have some kind of message after the backup is restored like: “you are using the plugins x, y, z, they probably require an action on your part”. As a reminder?

    Thread Starter joshuaiz

    (@joshuaiz)

    Ideally you would only need to generate retina images since the last migration as the rest would have already been generated.

    Alas, since there is no db entry there is no way to check to see which images need to be generated.

    This might be a little crazy but I also use EWWW Image Optimizer along with your plugin and EWWW does record what images have been optimized in the db so conceivably you could use those entries as a check but I’m assuming that anything like that would be super hacky.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Option to add images to db’ is closed to new replies.