Skip to content

Instantly share code, notes, and snippets.

View pedrorvidal's full-sized avatar

Pedro Vidal pedrorvidal

View GitHub Profile
@pedrorvidal
pedrorvidal / functions.php
Created November 19, 2024 01:22
Convert images to .webp
<?php
add_filter('wp_handle_upload', 'convert_to_webp', 10, 2);
function convert_to_webp($upload, $context) {
$file_path = $upload['file'];
$file_info = pathinfo($file_path);
$extension = strtolower($file_info['extension']);
$allowed_extensions = ['jpeg', 'jpg', 'png', 'gif'];
if (in_array($extension, $allowed_extensions)) {
@pedrorvidal
pedrorvidal / prod.yml
Last active December 13, 2025 13:18
deploy-ftp-workflow
name: Deploy GE Healthcare
on:
push:
branches:
- main
jobs:
FTP-Deploy-Action:
name: FTP-Deploy-Action
runs-on: ubuntu-latest
steps: