visit IOTSHARING.COM for more the original version is for Arduino, I modified a little to adapt with esp32.
Demo 4: How to use Arduino ESP32 to display information on I2C LCD http://www.iotsharing.com/2017/05/how-to-use-arduino-esp32-to-display-i2c-lcd.html
Create a new folder called "LiquidCrystal_I2C" under the folder named "libraries" in your Arduino sketchbook folder. Create the folder "libraries" in case it does not exist yet. Place all the files in the "LiquidCrystal_I2C" folder.
To use the library in your own sketch, select it from Sketch > Import Library.
This library is based on work done by DFROBOT (www.dfrobot.com).